Trait tch::nn::OptimizerConfig[][src]

pub trait OptimizerConfig where
    Self: Sized
{ fn build_copt(&self, lr: f64) -> Result<COptimizer, TchError>; fn build(self, vs: &VarStore, lr: f64) -> Result<Optimizer<Self>, TchError> { ... } }

Optimizer configurations. These configs can be used to build optimizer.

Required methods

fn build_copt(&self, lr: f64) -> Result<COptimizer, TchError>[src]

Loading content...

Provided methods

fn build(self, vs: &VarStore, lr: f64) -> Result<Optimizer<Self>, TchError>[src]

Builds an optimizer with the specified learning rate handling variables stored in vs.

Loading content...

Implementors

impl OptimizerConfig for Adam[src]

impl OptimizerConfig for AdamW[src]

impl OptimizerConfig for RmsProp[src]

impl OptimizerConfig for Sgd[src]

Loading content...