ClikaRT::ops::mse_loss
function
mse_loss()
Tensor mse_loss(
Tensor input,
Tensor target,
Reduction reduction = Reduction::Mean
)
Mean-squared-error loss between input and target.
Reduction::None returns the per-element losses (shape of input); Mean / Sum reduce to a 0-D scalar.
Parameters
input: predictions; float dtype.target: ground truth; same shape asinput.reduction:None/Mean/Sum; defaultMean.
Returns: the loss (0-D under Mean/Sum).
Throws
ClikaRT::Error: (INVALID_ARGUMENT) on an input/target shape mismatch.
Declared in ClikaRT/compute/ops.h, line 2999