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