Struct dfdx::tensor_ops::AdamConfig
source · pub struct AdamConfig {
pub lr: f64,
pub betas: [f64; 2],
pub eps: f64,
pub weight_decay: Option<WeightDecay>,
}
Expand description
Configuration of hyperparameters for crate::optim::Adam.
Changing all default parameters:
AdamConfig {
lr: 1e-2,
betas: [0.1, 0.2],
eps: 1e-6,
weight_decay: Some(WeightDecay::L2(1e-1)),
};
Fields§
§lr: f64
Learning rate. Defaults to 1e-3
.
betas: [f64; 2]
Betas from Adam paper. Defaults to [0.9, 0.999]
.
eps: f64
Epsilon for numerical stability. Defaults to 1e-8
.
weight_decay: Option<WeightDecay>
Optional weight decay. Defaults to None
.
Implementations§
Trait Implementations§
source§impl Clone for AdamConfig
impl Clone for AdamConfig
source§fn clone(&self) -> AdamConfig
fn clone(&self) -> AdamConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AdamConfig
impl Debug for AdamConfig
source§impl Default for AdamConfig
impl Default for AdamConfig
impl Copy for AdamConfig
Auto Trait Implementations§
impl RefUnwindSafe for AdamConfig
impl Send for AdamConfig
impl Sync for AdamConfig
impl Unpin 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