pub struct LRSchedulerConfig {
pub schedule_type: ScheduleType,
pub initial_lr: f64,
pub min_lr: f64,
pub gamma: f64,
pub step_size: usize,
pub total_steps: usize,
pub warmup_steps: usize,
pub max_lr: f64,
}Expand description
Configuration for a learning rate scheduler.
Fields§
§schedule_type: ScheduleTypeWhich schedule to use.
initial_lr: f64Starting learning rate (default 0.01).
min_lr: f64Floor learning rate for cosine / OneCycle (default 1e-6).
gamma: f64Decay factor for Step/Exponential schedules (default 0.1).
step_size: usizeEpoch count between decays for StepDecay (default 30).
total_steps: usizeTotal training steps for Cosine / OneCycle (default 1000).
warmup_steps: usizeNumber of warmup steps for Warmup / OneCycle (default 100).
max_lr: f64Peak learning rate for OneCycle (default 0.1).
Trait Implementations§
Source§impl Clone for LRSchedulerConfig
impl Clone for LRSchedulerConfig
Source§fn clone(&self) -> LRSchedulerConfig
fn clone(&self) -> LRSchedulerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LRSchedulerConfig
impl Debug for LRSchedulerConfig
Auto Trait Implementations§
impl Freeze for LRSchedulerConfig
impl RefUnwindSafe for LRSchedulerConfig
impl Send for LRSchedulerConfig
impl Sync for LRSchedulerConfig
impl Unpin for LRSchedulerConfig
impl UnsafeUnpin for LRSchedulerConfig
impl UnwindSafe for LRSchedulerConfig
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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