pub struct QuantizationMetrics {
pub mse: f64,
pub snr_db: f64,
pub psnr_db: f64,
pub compression_ratio: f64,
pub original_size: usize,
pub quantized_size: usize,
}Expand description
Quantization performance metrics
Fields§
§mse: f64Mean Squared Error
snr_db: f64Signal-to-Noise Ratio (dB)
psnr_db: f64Peak Signal-to-Noise Ratio (dB)
compression_ratio: f64Compression ratio
original_size: usizeOriginal tensor size in bytes
quantized_size: usizeQuantized tensor size in bytes
Implementations§
Source§impl QuantizationMetrics
impl QuantizationMetrics
Sourcepub fn is_acceptable(&self, min_snr_db: f64, max_mse: f64) -> bool
pub fn is_acceptable(&self, min_snr_db: f64, max_mse: f64) -> bool
Check if quantization quality is acceptable
Sourcepub fn memory_savings(&self) -> f64
pub fn memory_savings(&self) -> f64
Get memory savings ratio
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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