pub trait Optimizer<U, D>{
type InternalType: ?Sized;
type InternalUpdateType<'a>: ?Sized;
// Required method
fn update<'a>(
&mut self,
e: &'a Self::InternalType,
w: Self::InternalUpdateType<'a>,
) -> Result<(), TrainingError>;
}
Expand description
Optimizer Definition
Required Associated Types§
type InternalType: ?Sized
type InternalUpdateType<'a>: ?Sized
Required Methods§
Sourcefn update<'a>(
&mut self,
e: &'a Self::InternalType,
w: Self::InternalUpdateType<'a>,
) -> Result<(), TrainingError>
fn update<'a>( &mut self, e: &'a Self::InternalType, w: Self::InternalUpdateType<'a>, ) -> Result<(), TrainingError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.