pub enum LRPolicy {
Fixed,
Step,
Exp,
}
Expand description
Learning Rate Policy for a [Solver][1] [1]: ./struct.Solver.html
The variables mentioned below are defined in the SolverConfig apart from iter, which is the current iteration of the solver, that is supplied as a parameter for the learning rate calculation.
Variants§
Fixed
always return base_lr
Step
learning rate decays every step
iterations.
return base_lr * gamma ^ (floor(iter / step))
Exp
return base_lr * gamma ^ iter
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for LRPolicy
impl Send for LRPolicy
impl Sync for LRPolicy
impl Unpin for LRPolicy
impl UnwindSafe for LRPolicy
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