pub struct RMSprop<U, D>{ /* private fields */ }
Expand description
RMSprop Implementation
Implementations§
Source§impl<U> RMSprop<U, DeviceCpu<U>>where
U: UnitValue<U>,
impl<U> RMSprop<U, DeviceCpu<U>>where
U: UnitValue<U>,
Source§impl<U> RMSprop<U, DeviceGpu<U>>
impl<U> RMSprop<U, DeviceGpu<U>>
Sourcepub fn new(
device: &DeviceGpu<U>,
size: usize,
) -> Result<RMSprop<U, DeviceGpu<U>>, OptimizerBuildError>
pub fn new( device: &DeviceGpu<U>, size: usize, ) -> Result<RMSprop<U, DeviceGpu<U>>, OptimizerBuildError>
Sourcepub fn with_lr(
device: &DeviceGpu<U>,
size: usize,
lr: U,
) -> Result<RMSprop<U, DeviceGpu<U>>, OptimizerBuildError>
pub fn with_lr( device: &DeviceGpu<U>, size: usize, lr: U, ) -> Result<RMSprop<U, DeviceGpu<U>>, OptimizerBuildError>
Sourcepub fn with_params(
device: &DeviceGpu<U>,
size: usize,
lr: U,
weight_decay: U,
alpha: U,
mu: U,
) -> Result<RMSprop<U, DeviceGpu<U>>, OptimizerBuildError>
pub fn with_params( device: &DeviceGpu<U>, size: usize, lr: U, weight_decay: U, alpha: U, mu: U, ) -> Result<RMSprop<U, DeviceGpu<U>>, OptimizerBuildError>
Create an instance of RMSprop with additional parameters other than the default values
§Arguments
size
- input sizelr
- Learning rateweight_decay
- Weight Decayalpha
- alphamu
- mu
Trait Implementations§
Source§impl<U> Optimizer<U, DeviceCpu<U>> for RMSprop<U, DeviceCpu<U>>where
U: UnitValue<U>,
impl<U> Optimizer<U, DeviceCpu<U>> for RMSprop<U, DeviceCpu<U>>where
U: UnitValue<U>,
type InternalType = [U]
type InternalUpdateType<'a> = ShieldSlice<'a, U>
Source§fn update<'a>(
&mut self,
e: &'a [U],
w: Self::InternalUpdateType<'a>,
) -> Result<(), TrainingError>
fn update<'a>( &mut self, e: &'a [U], w: Self::InternalUpdateType<'a>, ) -> Result<(), TrainingError>
Update Weights Read more
Source§impl<U> Optimizer<U, DeviceGpu<U>> for RMSprop<U, DeviceGpu<U>>
impl<U> Optimizer<U, DeviceGpu<U>> for RMSprop<U, DeviceGpu<U>>
type InternalType = CudaMemoryPoolPtr<U>
type InternalUpdateType<'a> = CudaMutPtr<'a, CudaMemoryPoolPtr<U>>
Source§fn update<'a>(
&mut self,
e: &'a CudaMemoryPoolPtr<U>,
w: CudaMutPtr<'a, CudaMemoryPoolPtr<U>>,
) -> Result<(), TrainingError>
fn update<'a>( &mut self, e: &'a CudaMemoryPoolPtr<U>, w: CudaMutPtr<'a, CudaMemoryPoolPtr<U>>, ) -> Result<(), TrainingError>
Update Weights Read more
Auto Trait Implementations§
impl<U, D> !Freeze for RMSprop<U, D>
impl<U, D> !RefUnwindSafe for RMSprop<U, D>
impl<U, D> !Send for RMSprop<U, D>
impl<U, D> !Sync for RMSprop<U, D>
impl<U, D> !Unpin for RMSprop<U, D>
impl<U, D> !UnwindSafe for RMSprop<U, D>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more