Syntax error in chapter2/softmax.py
mschilli opened this issue · 1 comments
mschilli commented
chapter2/softmax.py doesn't seem to work with Tensorflow 1.0:
cross_entropy = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(y_pred, y_true))
File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/nn_ops.py", line 1578, in softmax_cross_entropy_with_logits
labels, logits)
File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/nn_ops.py", line 1533, in _ensure_xent_args
"named arguments (labels=..., logits=..., ...)" % name)
ValueError: Only call softmax_cross_entropy_with_logits
with named arguments (labels=..., logits=..., ...)
Hezi-Resheff commented
Thank you for the catch! It is now adapted to tf 1.0 (also works with older versions).