pub struct ActivationStatistics { /* private fields */ }Expand description
Track statistics for named tensors across training steps.
Implementations§
Source§impl ActivationStatistics
impl ActivationStatistics
Sourcepub fn new(max_history: usize) -> Self
pub fn new(max_history: usize) -> Self
Create a new activation statistics tracker with the given history limit.
Sourcepub fn record(&mut self, name: &str, data: &[f64]) -> Result<(), StatsError>
pub fn record(&mut self, name: &str, data: &[f64]) -> Result<(), StatsError>
Record statistics for a named tensor.
Sourcepub fn latest(&self, name: &str) -> Option<&TensorStats>
pub fn latest(&self, name: &str) -> Option<&TensorStats>
Get the most recent stats for a named tensor.
Sourcepub fn trend_mean(&self, name: &str) -> Option<Vec<f64>>
pub fn trend_mean(&self, name: &str) -> Option<Vec<f64>>
Get the trend of means over history for a named tensor.
Sourcepub fn tracked_count(&self) -> usize
pub fn tracked_count(&self) -> usize
Number of tracked tensors.
Auto Trait Implementations§
impl Freeze for ActivationStatistics
impl RefUnwindSafe for ActivationStatistics
impl Send for ActivationStatistics
impl Sync for ActivationStatistics
impl Unpin for ActivationStatistics
impl UnsafeUnpin for ActivationStatistics
impl UnwindSafe for ActivationStatistics
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> 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