pub struct RmsPropConfig {
pub lr: f32,
pub alpha: f32,
pub eps: f32,
pub weight_decay: f32,
pub momentum: f32,
pub centered: bool,
}Expand description
torch.optim.RMSprop と同一の既定値。
Fields§
§lr: f32学習率(lr)。有限かつ >= 0.0 を RmsProp::new が検証する。
alpha: f32二乗移動平均の減衰率(alpha)。有限かつ [0.0, 1.0) を
RmsProp::new が検証する(alpha = 1.0 は square_avg が
一切更新されない退化ケースのため意図的に拒否する)。
eps: f32ゼロ除算防止項(eps)。sqrt(square_avg) の後に加算する
(PyTorch と同順)。有限かつ > 0.0 を RmsProp::new が検証
する。
weight_decay: f32L2 正則化係数。PyTorch RMSprop と同じ coupled 方式(勾配へ
weight_decay * param を加算してから以降の更新式へ渡す。
AdamW の decoupled 方式とは異なる)。有限かつ >= 0.0 を
RmsProp::new が検証する。
momentum: f32モメンタム係数。> 0.0 のとき buf = momentum*buf + g/avg
を経由した更新(p -= lr*buf)へ切り替わる。有限かつ
>= 0.0 を RmsProp::new が検証する。
centered: boolcentered RMSprop(avg = sqrt(square_avg - grad_avg^2))を
有効化するか。false(既定)では avg = sqrt(square_avg)。
Trait Implementations§
Source§impl Clone for RmsPropConfig
impl Clone for RmsPropConfig
Source§fn clone(&self) -> RmsPropConfig
fn clone(&self) -> RmsPropConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RmsPropConfig
Source§impl Debug for RmsPropConfig
impl Debug for RmsPropConfig
Source§impl Default for RmsPropConfig
impl Default for RmsPropConfig
Source§fn default() -> RmsPropConfig
fn default() -> RmsPropConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for RmsPropConfig
impl PartialEq for RmsPropConfig
impl StructuralPartialEq for RmsPropConfig
Auto Trait Implementations§
impl Freeze for RmsPropConfig
impl RefUnwindSafe for RmsPropConfig
impl Send for RmsPropConfig
impl Sync for RmsPropConfig
impl Unpin for RmsPropConfig
impl UnsafeUnpin for RmsPropConfig
impl UnwindSafe for RmsPropConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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