pub struct SgdrScheduler {
pub max_lr: f64,
pub min_lr: f64,
pub t_0: usize,
pub t_mult: f64,
/* private fields */
}Expand description
SGDR: Stochastic Gradient Descent with Warm Restarts scheduler.
Based on “SGDR: Stochastic Gradient Descent with Warm Restarts” (Loshchilov & Hutter, 2017). Periodically resets the learning rate to a high value and then decays it using cosine annealing.
Fields§
§max_lr: f64Initial learning rate (after restart).
min_lr: f64Minimum learning rate.
t_0: usizeInitial period length.
t_mult: f64Period multiplication factor after each restart.
Implementations§
Source§impl SgdrScheduler
impl SgdrScheduler
Trait Implementations§
Source§impl Clone for SgdrScheduler
impl Clone for SgdrScheduler
Source§fn clone(&self) -> SgdrScheduler
fn clone(&self) -> SgdrScheduler
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 SgdrScheduler
impl Debug for SgdrScheduler
Source§impl LrScheduler for SgdrScheduler
impl LrScheduler for SgdrScheduler
Auto Trait Implementations§
impl Freeze for SgdrScheduler
impl RefUnwindSafe for SgdrScheduler
impl Send for SgdrScheduler
impl Sync for SgdrScheduler
impl Unpin for SgdrScheduler
impl UnwindSafe for SgdrScheduler
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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