pub struct ScalerState {
pub scale: f32,
pub growth_factor: f32,
pub backoff_factor: f32,
pub growth_interval: usize,
pub growth_tracker: usize,
pub consecutive_non_overflow: usize,
pub enabled: bool,
}Expand description
State of the gradient scaler
Fields§
§scale: f32Current scale factor
growth_factor: f32Growth factor for scale
backoff_factor: f32Backoff factor for scale
growth_interval: usizeNumber of iterations between scale updates
growth_tracker: usizeNumber of iterations since last scale update
consecutive_non_overflow: usizeNumber of consecutive non-overflowed iterations
enabled: boolWhether dynamic scaling is enabled
Trait Implementations§
Source§impl Clone for ScalerState
impl Clone for ScalerState
Source§fn clone(&self) -> ScalerState
fn clone(&self) -> ScalerState
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 ScalerState
impl Debug for ScalerState
Auto Trait Implementations§
impl Freeze for ScalerState
impl RefUnwindSafe for ScalerState
impl Send for ScalerState
impl Sync for ScalerState
impl Unpin for ScalerState
impl UnwindSafe for ScalerState
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