O'Reilly logo
  • Shinto Theruvil thinks this is interesting:

losses = tf.nn.sparse_softmax_cross_entropy_with_logits(logits_out, y_output) loss = tf.reduce_mean(losses)

From

Cover of TensorFlow Machine Learning Cookbook

Note

tf.nn.sparse_softmax_cross_entropy_with_logits(logits=logits_out, labels=y_output)