pub struct RMSprop {
    pub cfg: RMSpropConfig,
    /* private fields */
}
Expand description

RMSprop As described in Hinton, 2012.

This implementation is based off of RMSprop from pytorch-image-models.

The pytorch implementation has some issues: https://github.com/pytorch/pytorch/issues/23796.

Note: we don’t provide lr_in_momentum option because it didn’t seem to make a difference in testing.

Example Usage:

let mut t = Tensor0D::ones();
let mut opt: RMSprop = Default::default();
let gradients = t.trace().backward();
opt.update(&mut t, gradients);

Changing default parmeters:

let rmsprop = RMSprop::new(RMSpropConfig {
    lr: 1e-3,
    alpha: 0.5,
    ..Default::default()
});

Fields

cfg: RMSpropConfig

Configuration like learning rate and momentum.

Implementations

Constructs a new RMSprop using cfg RMSpropConfig.

Trait Implementations

Formats the value using the given formatter. Read more

Retrieves the data associated with p if there is any. This can modify self, for instance if velocities are calculated based on the associated data! Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.