Given an input
and a target
, compute the loss function associated to the criterion and return the
result. In general input
and target
are tensors, but some specific criterions
might require some other type of object.
The output
returned should be a scalar in general.
The state variable self.output
should be updated after a call to forward()
.