def _softmax_entropy(probabilities, targets, weights=None): return metric_ops.streaming_mean(losses.sparse_softmax_cross_entropy( probabilities, math_ops.to_int32(targets)), weights=weights)