1:参考链接:https://www.tensorflow.org/get_started/mnist/beginners loss_cross_entrap = tf.reduce_mean(-tf.reduce_sum(y_ * tf.log(y), reduction_indices=[1])) 其中图片为交叉熵公式,代码为loss损失函数。