ValueError when executing softmax_cross_entropy_with_logits
the function softmax_cross_entropy_with_logits
has been deprecated. The new function is softmax_cross_entropy_with_logits_v2
cost=tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits_v2(pred, y))
Documentation
Change
tf.nn.softmax_cross_entropy_with_logits(prediction,y)
to
tf.nn.softmax_cross_entropy_with_logits(logits=prediction, labels=y)