pub enum LearningRate {
Constant(f32),
Schedule(Arc<dyn Fn(&Array) -> Array + Send + Sync>),
}Expand description
A learning rate: a constant or a function of the step (a 0-D array, from 0) returning a 0-D array, so a compiled step sees every new rate.
Variants§
Constant(f32)
The same rate at every step (it initialises the state’s rate array).
Schedule(Arc<dyn Fn(&Array) -> Array + Send + Sync>)
The rate at each step, written into the state before each update.
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§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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