Struct tch::COptimizer
source · [−]pub struct COptimizer { /* private fields */ }
Implementations
sourceimpl COptimizer
impl COptimizer
pub fn adam(
lr: f64,
beta1: f64,
beta2: f64,
wd: f64
) -> Result<COptimizer, TchError>
pub fn adamw(
lr: f64,
beta1: f64,
beta2: f64,
wd: f64
) -> Result<COptimizer, TchError>
pub fn rms_prop(
lr: f64,
alpha: f64,
eps: f64,
wd: f64,
momentum: f64,
centered: bool
) -> Result<COptimizer, TchError>
pub fn sgd(
lr: f64,
momentum: f64,
dampening: f64,
wd: f64,
nesterov: bool
) -> Result<COptimizer, TchError>
pub fn add_parameters(
&mut self,
t: &Tensor,
group: usize
) -> Result<(), TchError>
pub fn set_learning_rate(&mut self, lr: f64) -> Result<(), TchError>
pub fn set_learning_rate_group(
&mut self,
group: usize,
lr: f64
) -> Result<(), TchError>
pub fn set_momentum(&mut self, m: f64) -> Result<(), TchError>
pub fn set_momentum_group(
&mut self,
group: usize,
m: f64
) -> Result<(), TchError>
pub fn set_weight_decay(&mut self, weight_decay: f64) -> Result<(), TchError>
pub fn set_weight_decay_group(
&mut self,
group: usize,
weight_decay: f64
) -> Result<(), TchError>
pub fn zero_grad(&self) -> Result<(), TchError>
pub fn step(&self) -> Result<(), TchError>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for COptimizer
impl !Sync for COptimizer
impl Unpin for COptimizer
impl UnwindSafe for COptimizer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more