pub struct LayerSensitivity {
pub bits_range: Vec<u32>,
pub mse_per_bits: Vec<f32>,
pub name: String,
}Expand description
Sensitivity scores for one layer across multiple bit-widths.
Fields§
§bits_range: Vec<u32>Candidate bit-widths tested (sorted ascending).
mse_per_bits: Vec<f32>Quantization MSE at each bit-width (same order as bits_range).
name: StringLayer name or identifier (optional).
Implementations§
Source§impl LayerSensitivity
impl LayerSensitivity
Sourcepub fn mse_at(&self, bits: u32) -> Option<f32>
pub fn mse_at(&self, bits: u32) -> Option<f32>
Return the sensitivity (MSE) for a specific bit-width.
Returns None if the bit-width was not tested.
Sourcepub fn mean_sensitivity(&self) -> f32
pub fn mean_sensitivity(&self) -> f32
Mean sensitivity across all tested bit-widths.
Sourcepub fn is_monotone(&self) -> bool
pub fn is_monotone(&self) -> bool
Returns true if higher bit-widths give lower MSE (monotone sensitivity).
Trait Implementations§
Source§impl Clone for LayerSensitivity
impl Clone for LayerSensitivity
Source§fn clone(&self) -> LayerSensitivity
fn clone(&self) -> LayerSensitivity
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 moreAuto Trait Implementations§
impl Freeze for LayerSensitivity
impl RefUnwindSafe for LayerSensitivity
impl Send for LayerSensitivity
impl Sync for LayerSensitivity
impl Unpin for LayerSensitivity
impl UnsafeUnpin for LayerSensitivity
impl UnwindSafe for LayerSensitivity
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