Function dfdx::losses::mse_loss

source ·
pub fn mse_loss<S: Shape, E: Dtype, D: Device<E>, T: Tape<E, D>>(
    pred: Tensor<S, E, D, T>,
    targ: Tensor<S, E, D>
) -> Tensor<Rank0, E, D, T>
Expand description

Mean Squared Error. This computes (pred - targ).square().mean().

See MeanTo, square(), and sub().