ValueError: Only call `softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
原因与解决:
原因是传参时没有写成"形参=实参"的形式,即应该写成这样:
tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=_pred,labels=y))。另外此方法已经过时,但目前还可以用
ValueError: Only call `softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
原因与解决:
原因是传参时没有写成"形参=实参"的形式,即应该写成这样:
tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=_pred,labels=y))。另外此方法已经过时,但目前还可以用