pub struct OneCyclePolicyScheduler { /* private fields */ }Expand description
One-cycle learning rate policy.
Phase 1 (pct_start of total_steps): linear ramp from base_lr to max_lr Phase 2 (remaining): cosine decay from max_lr to min_lr
Implementations§
Trait Implementations§
Source§impl LrSchedulerV2 for OneCycleLrScheduler
impl LrSchedulerV2 for OneCycleLrScheduler
Source§fn current_lr(&self) -> f64
fn current_lr(&self) -> f64
Return the current learning rate without advancing.
Source§fn steps_taken(&self) -> usize
fn steps_taken(&self) -> usize
Total number of steps taken.
Source§fn completed_cycle(&self) -> bool
fn completed_cycle(&self) -> bool
Whether the scheduler has completed a cycle (if applicable).
Auto Trait Implementations§
impl Freeze for OneCycleLrScheduler
impl RefUnwindSafe for OneCycleLrScheduler
impl Send for OneCycleLrScheduler
impl Sync for OneCycleLrScheduler
impl Unpin for OneCycleLrScheduler
impl UnsafeUnpin for OneCycleLrScheduler
impl UnwindSafe for OneCycleLrScheduler
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