pub struct AdamW { /* private fields */ }
Implementations§
source§impl AdamW
impl AdamW
pub fn new_lr(vars: Vec<Var>, learning_rate: f64) -> Result<Self>
pub fn params(&self) -> &ParamsAdamW
pub fn set_params(&mut self, params: ParamsAdamW)
Trait Implementations§
source§impl Optimizer for AdamW
impl Optimizer for AdamW
type Config = ParamsAdamW
fn new(vars: Vec<Var>, params: ParamsAdamW) -> Result<Self>
fn learning_rate(&self) -> f64
fn set_learning_rate(&mut self, lr: f64)
fn step(&mut self, grads: &GradStore) -> Result<()>
fn empty(config: Self::Config) -> Result<Self>
fn backward_step(&mut self, loss: &Tensor) -> Result<()>
fn from_slice(vars: &[&Var], config: Self::Config) -> Result<Self>
Auto Trait Implementations§
impl Freeze for AdamW
impl !RefUnwindSafe for AdamW
impl Send for AdamW
impl Sync for AdamW
impl Unpin for AdamW
impl !UnwindSafe for AdamW
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
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