pub struct RMSprop<M, E: Dtype, D: Storage<E>> {
pub cfg: RMSpropConfig,
/* private fields */
}
Expand description
RMSprop As described in Hinton, 2012.
This implementation is based off of RMSprop from pytorch-image-models because the pytorch implementation has some issues.
The main difference between the pytorch implementation is that RMSpropConfig::eps is added inside of the sqrt() operation.
The lr_in_momentum
option is not provided because it didn’t seem to make a difference in testing.
Example Usage
Constructing using new:
let rmsprop: RMSprop<Model, f32, Cpu> = RMSprop::new(&model, RMSpropConfig {
lr: 1e-3,
alpha: 0.5,
eps: 1e-8,
momentum: Some(0.5),
centered: false,
weight_decay: Some(WeightDecay::Decoupled(1e-1)),
});
Fields§
§cfg: RMSpropConfig
Hyperparameter configuration
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<M, E, D> RefUnwindSafe for RMSprop<M, E, D>where M: RefUnwindSafe, <D as Storage<E>>::Vec: RefUnwindSafe,
impl<M, E, D> !Send for RMSprop<M, E, D>
impl<M, E, D> !Sync for RMSprop<M, E, D>
impl<M, E, D> Unpin for RMSprop<M, E, D>
impl<M, E, D> UnwindSafe for RMSprop<M, E, D>where M: RefUnwindSafe, <D as Storage<E>>::Vec: RefUnwindSafe,
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