embedded criterion
whether to divide the length of input along dimension.
to compute criterion loss along the input and target dimension if sizeAverage=true, and dimension=1, it means to divide the batch size; if sizeAverage=true, and dimension=2, it means to divide the sequence length
Performs a back-propagation step through the criterion, with respect to the given input.
Performs a back-propagation step through the criterion, with respect to the given input.
input data
target
gradient corresponding to input data
Deep copy this criterion
embedded criterion
to compute criterion loss along the input and target dimension if sizeAverage=true, and dimension=1, it means to divide the batch size; if sizeAverage=true, and dimension=2, it means to divide the sequence length
Takes an input object, and computes the corresponding loss of the criterion,
compared with target
.
Takes an input object, and computes the corresponding loss of the criterion,
compared with target
.
input data
target
the loss of criterion
whether to divide the length of input along dimension.
Computing the gradient of the criterion with respect to its own input.
Computing the gradient of the criterion with respect to its own input. This is returned in gradInput. Also, the gradInput state variable is updated accordingly.
input data
target data / labels
gradient of input
Computes the loss using input and objective function.
Computes the loss using input and objective function. This function returns the result which is stored in the output field.
input of the criterion
target or labels
the loss of the criterion
This class is intended to support inputs with 3 or more dimensions. Apply Any Provided Criterion to every temporal slice of an input.