pub enum LrSchedule {
Constant,
Step {
step_size: usize,
gamma: f32,
},
CosineAnnealing {
min_lr: f32,
},
}Expand description
Learning rate schedule (applied per epoch).
Variants§
Constant
Keep lr constant.
Step
Step decay: lr = lr0 * gamma^(epoch / step_size).
CosineAnnealing
Cosine annealing from lr0 down to min_lr.
Implementations§
Trait Implementations§
Source§impl Clone for LrSchedule
impl Clone for LrSchedule
Source§fn clone(&self) -> LrSchedule
fn clone(&self) -> LrSchedule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LrSchedule
impl Debug for LrSchedule
Source§impl Default for LrSchedule
impl Default for LrSchedule
Source§fn default() -> LrSchedule
fn default() -> LrSchedule
Returns the “default value” for a type. Read more
Source§impl PartialEq for LrSchedule
impl PartialEq for LrSchedule
impl Copy for LrSchedule
impl StructuralPartialEq for LrSchedule
Auto Trait Implementations§
impl Freeze for LrSchedule
impl RefUnwindSafe for LrSchedule
impl Send for LrSchedule
impl Sync for LrSchedule
impl Unpin for LrSchedule
impl UnwindSafe for LrSchedule
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