pub struct RMSprop<M, E: Dtype, D: DeviceStorage> {
pub cfg: RMSpropConfig<E>,
/* 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<E>
Hyperparameter configuration
Implementations§
source§impl<M, E: Dtype, D: DeviceStorage> RMSprop<M, E, D>
impl<M, E: Dtype, D: DeviceStorage> RMSprop<M, E, D>
sourcepub fn new(_model: &M, cfg: RMSpropConfig<E>) -> Self
pub fn new(_model: &M, cfg: RMSpropConfig<E>) -> Self
Constructs using hyperparameters from cfg
.