pub struct GradScalerState {
pub scale: f32,
pub growth_tracker: u64,
}Expand description
Resume-relevant GradScaler state: the dynamic scale and the growth counter tracking consecutive finite steps. Configuration factors are construction-time constants and do not participate.
Fields§
§scale: f32Current loss scale.
growth_tracker: u64Consecutive finite steps toward the next growth doubling.
Trait Implementations§
Source§impl Clone for GradScalerState
impl Clone for GradScalerState
impl Copy for GradScalerState
Source§impl Debug for GradScalerState
impl Debug for GradScalerState
Source§impl PartialEq for GradScalerState
impl PartialEq for GradScalerState
impl StructuralPartialEq for GradScalerState
Auto Trait Implementations§
impl Forget for GradScalerState
impl Freeze for GradScalerState
impl Move for GradScalerState
impl RefUnwindSafe for GradScalerState
impl Send for GradScalerState
impl Sync for GradScalerState
impl Unpin for GradScalerState
impl UnsafeUnpin for GradScalerState
impl UnwindSafe for GradScalerState
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