Computes softmax cross entropy cost and gradients to backpropagate.
tf.raw_ops.SparseSoftmaxCrossEntropyWithLogits(
features, labels, name=None
)
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.
Returns | |
---|---|
A tuple of Tensor objects (loss, backprop).
|
|
loss
|
A Tensor . Has the same type as features .
|
backprop
|
A Tensor . Has the same type as features .
|