Here is what I could do.
How did I get this error?
This error occurs when two conditions are met in the same session:
- Tensorflow variable is set to
- The same variable is also passed the value as part of feed_dict
That is why the first 2 runs of success (both of them simultaneously do not satisfy these two conditions).
Why am I getting this error?
I'm not sure, but I'm not the intentional choice of Google design. Here is my explanation:
First, the source code for TF (TensorFlow) resolves x.assign(1) to tf.assign(x, 1) , which gives us a hint to better understand the error message when it says Input 0 .
The error message applies to x when Input 0 specified for assignment op. It is further indicated that the first assignment argument is op was passed float from _arg_x_0_0:0 .
TL; DR
Thus, to run, where the TF variable is provided as a feed, this variable will no longer be considered as a variable (but instead as the value that it was assigned), and therefore any attempts to further assign it a value will be erroneous, since only TF variables can be assigned a value in the graph.
source share