pub enum LossScalingStrategy {
None,
Static {
scale: f64,
},
Dynamic {
init_scale: f64,
growth_factor: f64,
backoff_factor: f64,
growth_interval: usize,
},
}Expand description
Loss scaling strategy for mixed precision training.
Variants§
None
No loss scaling
Static
Static loss scaling with a fixed scale factor
Dynamic
Dynamic loss scaling with automatic adjustment
Trait Implementations§
Source§impl Clone for LossScalingStrategy
impl Clone for LossScalingStrategy
Source§fn clone(&self) -> LossScalingStrategy
fn clone(&self) -> LossScalingStrategy
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 LossScalingStrategy
impl Debug for LossScalingStrategy
Source§impl Default for LossScalingStrategy
impl Default for LossScalingStrategy
Source§impl<'de> Deserialize<'de> for LossScalingStrategy
impl<'de> Deserialize<'de> for LossScalingStrategy
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 PartialEq for LossScalingStrategy
impl PartialEq for LossScalingStrategy
Source§impl Serialize for LossScalingStrategy
impl Serialize for LossScalingStrategy
impl StructuralPartialEq for LossScalingStrategy
Auto Trait Implementations§
impl Freeze for LossScalingStrategy
impl RefUnwindSafe for LossScalingStrategy
impl Send for LossScalingStrategy
impl Sync for LossScalingStrategy
impl Unpin for LossScalingStrategy
impl UnwindSafe for LossScalingStrategy
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