T
- data type for loss()
output@Operator(group="nn") public final class SoftmaxCrossEntropyWithLogits<T extends Number> extends PrimitiveOp
Inputs are the logits, not probabilities.
operation
Modifier and Type | Method and Description |
---|---|
Output<T> |
backprop()
backpropagated gradients (batch_size x num_classes matrix).
|
static <T extends Number> |
create(Scope scope,
Operand<T> features,
Operand<T> labels)
Factory method to create a class wrapping a new SoftmaxCrossEntropyWithLogits operation.
|
Output<T> |
loss()
Per example loss (batch_size vector).
|
equals, hashCode, op, toString
public static <T extends Number> SoftmaxCrossEntropyWithLogits<T> create(Scope scope, Operand<T> features, Operand<T> labels)
scope
- current scopefeatures
- batch_size x num_classes matrixlabels
- batch_size x num_classes matrix
The caller must ensure that each batch of labels represents a valid
probability distribution.Copyright © 2022. All rights reserved.