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
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
Deep copy this criterion
a deep copied criterion
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
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
AbstractCriterion is an abstract class the concrete criterion should extend.
Criterion
s are helpful to train a neural network. Given an input and a target, they compute the gradient according to a loss function.It provides some important method such as
forward
,backward
,updateOutput
,updateGradInput
frequently used as a criteria. Some of them need to be override in a concrete criterion class.represents the input type of the criterion, which an be abstract type Activity, or concrete type Tensor or Table
represents the output type of the criterion
The numeric type in the criterion, usually which are Float or Double