pub enum LearningRate {
Constant(f32),
Schedule(Arc<dyn Fn(u64) -> f32 + Send + Sync>),
}Expand description
A learning rate: a constant or a function of the step (from 0).
Variants§
Constant(f32)
The same rate at every step.
Schedule(Arc<dyn Fn(u64) -> f32 + Send + Sync>)
The rate at each step.
Implementations§
Trait Implementations§
Source§impl Clone for LearningRate
impl Clone for LearningRate
Source§impl Debug for LearningRate
impl Debug for LearningRate
Source§impl From<f32> for LearningRate
impl From<f32> for LearningRate
Auto Trait Implementations§
impl !RefUnwindSafe for LearningRate
impl !UnwindSafe for LearningRate
impl Freeze for LearningRate
impl Send for LearningRate
impl Sync for LearningRate
impl Unpin for LearningRate
impl UnsafeUnpin for LearningRate
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
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> 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