pub struct HistogramObserver {
pub bits: u32,
pub symmetric: bool,
/* private fields */
}Expand description
Calibrates using a fixed-width histogram and min-MSE clipping search.
Accumulates a histogram over the absolute range of all observed data.
compute_params searches over percentile clipping thresholds and returns
the range that minimises estimated quantization MSE.
Fields§
§bits: u32Quantization bit-width.
symmetric: boolSymmetric vs asymmetric.
Implementations§
Trait Implementations§
Source§impl Clone for HistogramObserver
impl Clone for HistogramObserver
Source§fn clone(&self) -> HistogramObserver
fn clone(&self) -> HistogramObserver
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 HistogramObserver
impl Debug for HistogramObserver
Source§impl Observer for HistogramObserver
impl Observer for HistogramObserver
Source§fn compute_params(&self) -> QuantResult<(f32, i32)>
fn compute_params(&self) -> QuantResult<(f32, i32)>
Compute
(scale, zero_point) from accumulated statistics. Read moreSource§fn is_calibrated(&self) -> bool
fn is_calibrated(&self) -> bool
Whether any data has been observed.
Auto Trait Implementations§
impl Freeze for HistogramObserver
impl RefUnwindSafe for HistogramObserver
impl Send for HistogramObserver
impl Sync for HistogramObserver
impl Unpin for HistogramObserver
impl UnsafeUnpin for HistogramObserver
impl UnwindSafe for HistogramObserver
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