pub struct AdamConfig {
pub lr: f32,
pub beta1: f32,
pub beta2: f32,
pub eps: f32,
pub weight_decay: f32,
}Expand description
torch.optim.Adam と同一の既定値。AdamWConfig::default() の
weight_decay = 0.01 とは異なり、torch.optim.Adam の既定
weight_decay=0 をそのまま採用する(default_weight_decay_is_zero
でドリフトを固定する)。
Fields§
§lr: f32学習率。有限かつ >= 0.0(Adam::new が検証する)。
beta1: f321 次モーメント(m)の指数移動平均係数。[0.0, 1.0)。
beta2: f322 次モーメント(v)の指数移動平均係数。[0.0, 1.0)。
eps: f32分母のゼロ除算防止項。有限かつ > 0.0。
weight_decay: f32coupled L2 weight decay 係数(モジュール doc 参照。AdamW の
decoupled decay とは適用箇所が異なる)。有限かつ >= 0.0。
0.0 のときは decay 項の演算自体を skip する
(weight_decay == 0.0 で AdamW(wd=0) と bit 一致する根拠)。
Trait Implementations§
Source§impl Clone for AdamConfig
impl Clone for AdamConfig
Source§fn clone(&self) -> AdamConfig
fn clone(&self) -> AdamConfig
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 AdamConfig
Source§impl Debug for AdamConfig
impl Debug for AdamConfig
Source§impl Default for AdamConfig
impl Default for AdamConfig
Source§fn default() -> AdamConfig
fn default() -> AdamConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for AdamConfig
impl PartialEq for AdamConfig
impl StructuralPartialEq for AdamConfig
Auto Trait Implementations§
impl Freeze for AdamConfig
impl RefUnwindSafe for AdamConfig
impl Send for AdamConfig
impl Sync for AdamConfig
impl Unpin for AdamConfig
impl UnsafeUnpin for AdamConfig
impl UnwindSafe for AdamConfig
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