(Jul-11-2017, 02:23 PM)ichabod801 Wrote: I tried adding python tags to your code, but it still losing the indentation. Please see the BBCode tutorial link in my signature and repost your code with proper formatting. Also post the entire traceback for the error you are getting. And your csv data doesn't look like it's in csv format. I don't see any commas. Is whatever is loading the data expecting commas? If it can handle the format of your data, my guess is that there is something in your data that is not a floating point number, like N/A or something. You'll need to clean up your data before you can process it.OK, I will repost my code later. The data doesn't copy from the CSV file so that there is not commas there. I already checked my data. There is no N/A or missing value inside.
(Jul-11-2017, 02:23 PM)ichabod801 Wrote: I tried adding python tags to your code, but it still losing the indentation. Please see the BBCode tutorial link in my signature and repost your code with proper formatting. Also post the entire traceback for the error you are getting. And your csv data doesn't look like it's in csv format. I don't see any commas. Is whatever is loading the data expecting commas? If it can handle the format of your data, my guess is that there is something in your data that is not a floating point number, like N/A or something. You'll need to clean up your data before you can process it.Here is the trace error:
WARNING:tensorflow:From D:\Anaconda4.4.0\envs\tensorflow\lib\site-packages\tensorflow\python\util\tf_should_use.py:170: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use
tf.global_variables_initializer
instead.---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-39b7fba5be19> in <module>()
84
85
---> 86 train_neural_network(x)
<ipython-input-6-39b7fba5be19> in train_neural_network(x)
73
74 _, c = sess.run([optimizer, cost], feed_dict={x: batch_x,
---> 75 y: batch_y})
76 epoch_loss += c
77 i+=batch_size
D:\Anaconda4.4.0\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py in run(self, fetches, feed_dict, options, run_metadata)
787 try:
788 result = self._run(None, fetches, feed_dict, options_ptr,
--> 789 run_metadata_ptr)
790 if run_metadata:
791 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
D:\Anaconda4.4.0\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py in _run(self, handle, fetches, feed_dict, options, run_metadata)
966 feed_handles[subfeed_name] = subfeed_val
967 else:
--> 968 np_val = np.asarray(subfeed_val, dtype=subfeed_dtype)
969
970 if (not is_tensor_handle_feed and
D:\Anaconda4.4.0\envs\tensorflow\lib\site-packages\numpy\core\numeric.py in asarray(a, dtype, order)
529
530 """
--> 531 return array(a, dtype, copy=False, order=order)
532
533
ValueError: could not convert string to float: 'train2.CSV'