Train

Trait Train 

Source
pub trait Train<X, Y> {
    type Output;

    // Required method
    fn train(
        &mut self,
        input: &X,
        target: &Y,
    ) -> Result<Self::Output, NeuralError>;

    // Provided method
    fn train_for(
        &mut self,
        input: &X,
        target: &Y,
        epochs: usize,
    ) -> Result<Self::Output, NeuralError> { ... }
}
Expand description

This trait defines the training process for the network

Required Associated Types§

Required Methods§

Source

fn train(&mut self, input: &X, target: &Y) -> Result<Self::Output, NeuralError>

Provided Methods§

Source

fn train_for( &mut self, input: &X, target: &Y, epochs: usize, ) -> Result<Self::Output, NeuralError>

Implementors§

Source§

impl<A, S, T> Train<ArrayBase<S, Dim<[usize; 1]>>, ArrayBase<T, Dim<[usize; 1]>>> for SurfaceModel<A>
where A: FftNum + Float + FromPrimitive + NumAssign + ScalarOperand, S: Data<Elem = A>, T: Data<Elem = A>,

Source§

impl<A, S, T> Train<ArrayBase<S, Dim<[usize; 2]>>, ArrayBase<T, Dim<[usize; 2]>>> for SurfaceModel<A>
where A: FftNum + Float + FromPrimitive + NumAssign + ScalarOperand, S: Data<Elem = A>, T: Data<Elem = A>,

Source§

impl<A, X, Y, Z> Train<X, Y> for SurfaceNetwork<A>
where A: Float + FromPrimitive + NumAssign + ScalarOperand, SurfaceModel<A>: Train<X, Y, Output = Z>,