Function neuronika::nn::loss::mse_loss [−][src]
pub fn mse_loss<T, U, V>(
input: VarDiff<T, U>,
target: Var<V>,
reduction: Reduction
) -> VarDiff<MSELoss<T, V>, MSELossBackward<U, T, V>> where
T: Data,
U: Gradient<Dim = T::Dim> + Overwrite,
V: Data<Dim = T::Dim>,
Expand description
Computes the mean squared error (squared L2 norm) between each element in the input x and target y.
1 n
Lᴏss = ― ∑ (xᵢ- ʏᵢ)²
n i=1