Trait CrossEntropy

Source
pub trait CrossEntropy {
    type Output;

    // Required method
    fn cross_entropy(&self) -> Self::Output;
}
Expand description

A trait for computing the cross-entropy loss of a tensor or array

Required Associated Types§

Required Methods§

Source

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

Implementations on Foreign Types§

Source§

impl<A, S, D> CrossEntropy for ArrayBase<S, D>
where A: Float + FromPrimitive + ScalarOperand, D: Dimension, S: Data<Elem = A>,

Source§

type Output = A

Source§

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

Implementors§