Trait Norm

Source
pub trait Norm {
    type Output;

    // Required methods
    fn l1_norm(&self) -> Self::Output;
    fn l2_norm(&self) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn l1_norm(&self) -> Self::Output

compute the L1 norm of the tensor or array

Source

fn l2_norm(&self) -> Self::Output

compute the L2 norm of the tensor or array

Implementors§

Source§

impl<U, V> Norm for U
where U: L1Norm<Output = V> + L2Norm<Output = V>,