Trait Optimizer

Source
pub trait Optimizer<U, D>
where U: Clone + Copy + UnitValue<U>, D: Device<U>,
{ 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§

Required Methods§

Source

fn update<'a>( &mut self, e: &'a Self::InternalType, w: Self::InternalUpdateType<'a>, ) -> Result<(), TrainingError>

Update Weights

§Arguments
  • e - error
  • w - weight

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.

Implementors§

Source§

impl<U> Optimizer<U, DeviceCpu<U>> for Adagrad<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

impl<U> Optimizer<U, DeviceCpu<U>> for Adam<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

impl<U> Optimizer<U, DeviceCpu<U>> for MomentumSGD<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

impl<U> Optimizer<U, DeviceCpu<U>> for RMSprop<U, DeviceCpu<U>>
where U: UnitValue<U>,

Source§

impl<U> Optimizer<U, DeviceCpu<U>> for SGD<U, DeviceCpu<U>>
where U: UnitValue<U>, DeviceCpu<U>: Device<U>,

Source§

impl<U> Optimizer<U, DeviceGpu<U>> for Adagrad<U, DeviceGpu<U>>
where U: UnitValue<U>, DeviceGpu<U>: Device<U>, for<'a> Adagrad<'a, U>: Kernel<Args = AdagradArgs<'a, U>>,

Source§

impl<U> Optimizer<U, DeviceGpu<U>> for Adam<U, DeviceGpu<U>>
where U: UnitValue<U>, DeviceGpu<U>: Device<U>, for<'a> Adam<'a, U>: Kernel<Args = AdamArgs<'a, U>>,

Source§

impl<U> Optimizer<U, DeviceGpu<U>> for MomentumSGD<U, DeviceGpu<U>>
where U: UnitValue<U>, DeviceGpu<U>: Device<U>, for<'a> MomentumSGD<'a, U>: Kernel<Args = MomentumSGDArgs<'a, U>>,

Source§

impl<U> Optimizer<U, DeviceGpu<U>> for RMSprop<U, DeviceGpu<U>>
where U: UnitValue<U>, DeviceGpu<U>: Device<U>, for<'a> RMSprop<'a, U>: Kernel<Args = RMSpropArgs<'a, U>>,

Source§

impl<U> Optimizer<U, DeviceGpu<U>> for SGD<U, DeviceGpu<U>>
where U: UnitValue<U>, DeviceGpu<U>: Device<U>, for<'a> SGD<'a, U>: Kernel<Args = SGDArgs<'a, U>>,