Problem :
I am currently working on the TensorFlow that uses very "weird" format of uploading the data. I am trying to to use the NumPy or pandas format for the data to be uploaded, to compare it with scikit-learn results.Also I am getting the digit recognition data from the Kaggle.
But facing following error:
---------------------------------------------------------------------------
FailedPreconditionError Traceback (most recent call last)
<ipython-input-82-967faab7d494> in <module>()
7 Target_batch = np.array(OHTarget[i*50:i*50+50].values)
8 Target_batch = np.multiply(Target_batch, 1.0 / 255.0)
----> 9 train_step.run(feed_dict={x: batch, y_: Target_batch})
/Users/alecxe/anaconda/lib/python2.7/site-packages/tensorflow/python/framework/ops.pyc in run(self, feed_dict, session)
2265 none, the default session will be used.
2266 """
-> 2267 _run_using_default_session(self, feed_dict, self.graph, session)
2268
2269
/Users/alecxe/anaconda/lib/python2.7/site-packages/tensorflow/python/framework/ops.pyc in _run_using_default_session(operation, feed_dict, graph, session)
3761 "the operation's graph is different from the session's "
3762 "graph.")
-> 3763 session.run(operation, feed_dict)
3764
3765
/Users/alecxe/anaconda/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in run(self, fetches, feed_dict)
443
444 # Run request and get response.
--> 445 results = self._do_run(target_list, unique_fetch_targets, feed_dict_string)
446
447 # User may have fetched the same tensor multiple times, but we
/Users/alecxe/anaconda/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in _do_run(self, target_list, fetch_list, feed_dict)
517 # pylint: disable=protected-access
518 raise errors._make_specific_exception(node_def, op, e.error_message,
--> 519 e.code)
520 # pylint: enable=protected-access
521 raise e_type, e_value, e_traceback
FailedPreconditionError: Attempting to use uninitialized value Variable_1
[[Node: gradients/add_grad/Shape_1 = Shape[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](Variable_1)]]