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
Required Associated Types§
Required Methods§
Provided Methods§
fn train_for( &mut self, input: &X, target: &Y, epochs: usize, ) -> Result<Self::Output, Self::Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".