Skip to main content

adamw

Function adamw 

Source
pub fn adamw(
    param: &mut Tensor,
    grad: &Tensor,
    m: &mut Tensor,
    v: &mut Tensor,
    lr: f32,
    beta1: f32,
    beta2: f32,
    eps: f32,
    weight_decay: f32,
    step: u32,
) -> Result<()>
Expand description

AdamW step with decoupled weight decay, updating param/m/v in place. step is 1-based.