在跑tensorflow事例时
$ python /Users/miao/anaconda/lib/python2.7/site-packages/tensorflow/models/image/mnist/convolutional.py
报如下错误
ValueError: Only call `softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
需要将源码中
loss = tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(
logits, train_labels_node))
修改为
loss = tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(
logits=logits, labels=train_labels_node))