You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Though the script works fine on r0.11, on r1.0 and above you hit this error (I tested on r1.0, r1.2 and r1.3):
```
# python mnist.py
Extracting MNIST_data/train-images-idx3-ubyte.gz
Extracting MNIST_data/train-labels-idx1-ubyte.gz
Extracting MNIST_data/t10k-images-idx3-ubyte.gz
Extracting MNIST_data/t10k-labels-idx1-ubyte.gz
Traceback (most recent call last):
File "mnist.py", line 96, in <module>
cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(pred, y))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/nn_ops.py", line 1558, in softmax_cross_entropy_with_logits
labels, logits)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/nn_ops.py", line 1512, in _ensure_xent_args
"named arguments (labels=..., logits=..., ...)" % name)
ValueError: Only call `softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
```
Implemented fix as described here: https://stackoverflow.com/a/42297021/112705
TESTING
After the change, I tested on TensorFlow r0.11 and r1.3, and the script runs successfully.
0 commit comments