pub struct QuantParams {
pub scales: Vec<f32>,
pub zero_points: Vec<i32>,
pub bits: u32,
pub scheme: QuantScheme,
}Expand description
Calibrated quantization parameters.
Fields§
§scales: Vec<f32>Per-scale values (length 1 for PerTensor, length n_channels or n_groups
for the other modes).
zero_points: Vec<i32>Per-zero-point values (always 0 for Symmetric).
bits: u32Number of quantization bits.
scheme: QuantSchemeScheme.
Implementations§
Trait Implementations§
Source§impl Clone for QuantParams
impl Clone for QuantParams
Source§fn clone(&self) -> QuantParams
fn clone(&self) -> QuantParams
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 QuantParams
impl RefUnwindSafe for QuantParams
impl Send for QuantParams
impl Sync for QuantParams
impl Unpin for QuantParams
impl UnsafeUnpin for QuantParams
impl UnwindSafe for QuantParams
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