Converting from Pandas dataframe to TensorFlow tensor object

后端 未结 6 531
灰色年华
灰色年华 2020-12-31 02:48

I\'m still new to Python, Machine Learning and TensorFlow, but doing my best to jump right in head-first. I could use some help though.

My data is currently in a Pan

6条回答
  •  无人及你
    2020-12-31 03:15

    I've converted my Pandas dataframe to a Numpy array using df.values

    Now, using

    dataVar_tensor = tf.constant(dataVar, dtype = tf.float32, shape=[15780,9])
    depth_tensor = tf.constant(depth, 'float32',shape=[15780,1])
    

    seems to work. I can't say it does definitively because I have other hurdles to overcome to get my code working, but it's hopefully a step in the right direction. Thanks for all your help

    As an aside, my trials of getting the tutorial to work on my own data are continued in my next question Converting TensorFlow tutorial to work with my own data

提交回复
热议问题