tf.raw_ops.SparseSoftmaxCrossEntropyWithLogits

Computes softmax cross entropy cost and gradients to backpropagate.

Unlike SoftmaxCrossEntropyWithLogits, this operation does not accept a matrix of label probabilities, but rather a single label per row of features. This label is considered to have probability 1.0 for the given row.

Inputs are the logits, not probabilities.

featuresA Tensor. Must be one of the following types: half, bfloat16, float32, float64. batch_size x num_classes matrix
labelsA Tensor. Must be one of the following types: int32, int64. batch_size vector with values in [0, num_classes). This is the label for the given minibatch entry.
nameA name for the operation (optional).

A tuple of Tensor objects (loss, backprop).
lossA Tensor. Has the same type as features.
backpropA Tensor. Has the same type as features.