pub struct QuantizationMetrics {
pub mse: f32,
pub psnr: f32,
pub snr: f32,
pub mae: f32,
pub max_error: f32,
pub zero_error_percentage: f32,
pub cosine_similarity: f32,
pub compression_ratio: f32,
}Expand description
Quantization quality metrics for measuring accuracy loss
Fields§
§mse: f32Mean Squared Error between original and quantized tensors
psnr: f32Peak Signal-to-Noise Ratio (PSNR) in dB
snr: f32Signal-to-Noise Ratio (SNR) in dB
mae: f32Mean Absolute Error between original and quantized tensors
max_error: f32Maximum absolute error
zero_error_percentage: f32Percentage of values with zero error
cosine_similarity: f32Cosine similarity between original and quantized tensors
compression_ratio: f32Compression ratio achieved
Trait Implementations§
Source§impl Clone for QuantizationMetrics
impl Clone for QuantizationMetrics
Source§fn clone(&self) -> QuantizationMetrics
fn clone(&self) -> QuantizationMetrics
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 QuantizationMetrics
impl Debug for QuantizationMetrics
Auto Trait Implementations§
impl Freeze for QuantizationMetrics
impl RefUnwindSafe for QuantizationMetrics
impl Send for QuantizationMetrics
impl Sync for QuantizationMetrics
impl Unpin for QuantizationMetrics
impl UnsafeUnpin for QuantizationMetrics
impl UnwindSafe for QuantizationMetrics
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