pub struct LearningRateConfig {
pub count: u64,
pub end: f64,
pub start: f64,
}
Expand description
A learning rate that can be a constant or exponentially decayed.
Fields§
§count: u64
The max count to update the learning rate.
end: f64
The final value of the learning rate.
start: f64
The initial value of the learning rate.
Implementations§
source§impl LearningRateConfig
impl LearningRateConfig
sourcepub fn init(&self) -> LearningRate
pub fn init(&self) -> LearningRate
Initialize the learning rate.
Trait Implementations§
source§impl Clone for LearningRateConfig
impl Clone for LearningRateConfig
source§impl Config for LearningRateConfig
impl Config for LearningRateConfig
source§impl Debug for LearningRateConfig
impl Debug for LearningRateConfig
source§impl Default for LearningRateConfig
impl Default for LearningRateConfig
source§impl<'de> Deserialize<'de> for LearningRateConfig
impl<'de> Deserialize<'de> for LearningRateConfig
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for LearningRateConfig
impl Display for LearningRateConfig
source§impl From<f64> for LearningRateConfig
impl From<f64> for LearningRateConfig
source§impl PartialEq for LearningRateConfig
impl PartialEq for LearningRateConfig
source§impl Serialize for LearningRateConfig
impl Serialize for LearningRateConfig
impl Copy for LearningRateConfig
impl StructuralPartialEq for LearningRateConfig
Auto Trait Implementations§
impl Freeze for LearningRateConfig
impl RefUnwindSafe for LearningRateConfig
impl Send for LearningRateConfig
impl Sync for LearningRateConfig
impl Unpin for LearningRateConfig
impl UnwindSafe for LearningRateConfig
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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