pub struct GradientStatistics {
pub current_norm: f64,
pub avg_norm: f64,
pub std_norm: f64,
pub clip_count: usize,
pub total_updates: usize,
pub adaptive_threshold: f64,
pub norm_history: Vec<f64>,
}Expand description
Statistics tracking for gradient clipping
Fields§
§current_norm: f64Current global gradient norm
avg_norm: f64Exponential moving average of gradient norms
std_norm: f64Standard deviation of recent gradient norms
clip_count: usizeNumber of times gradients were clipped
total_updates: usizeTotal number of gradient updates processed
adaptive_threshold: f64Current adaptive threshold (if adaptive scaling is enabled)
norm_history: Vec<f64>History of recent gradient norms (for statistics calculation)
Trait Implementations§
Source§impl Clone for GradientStatistics
impl Clone for GradientStatistics
Source§fn clone(&self) -> GradientStatistics
fn clone(&self) -> GradientStatistics
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 GradientStatistics
impl Debug for GradientStatistics
Auto Trait Implementations§
impl Freeze for GradientStatistics
impl RefUnwindSafe for GradientStatistics
impl Send for GradientStatistics
impl Sync for GradientStatistics
impl Unpin for GradientStatistics
impl UnsafeUnpin for GradientStatistics
impl UnwindSafe for GradientStatistics
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