pub trait Train<X, Y> {
type Error;
type Output;
// Required method
fn train(
&mut self,
input: &X,
target: &Y,
) -> Result<Self::Output, Self::Error>;
// Provided method
fn train_for(
&mut self,
input: &X,
target: &Y,
epochs: usize,
) -> Result<Self::Output, Self::Error> { ... }
}Expand description
This trait defines the training process for the network