pub struct AffineParams {
pub scale: f32,
pub zero_point: i32,
}Expand description
Per-group affine quantization parameters: q = round(x / scale) + zero_point, clamped to the
scheme’s [qmin, qmax].
Fields§
§scale: f32The quantization scale (always > 0).
zero_point: i32The zero-point in quantized (integer) units. 0 for symmetric quantization.
Trait Implementations§
Source§impl Clone for AffineParams
impl Clone for AffineParams
Source§fn clone(&self) -> AffineParams
fn clone(&self) -> AffineParams
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 moreSource§impl Debug for AffineParams
impl Debug for AffineParams
Source§impl PartialEq for AffineParams
impl PartialEq for AffineParams
Source§fn eq(&self, other: &AffineParams) -> bool
fn eq(&self, other: &AffineParams) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for AffineParams
impl StructuralPartialEq for AffineParams
Auto Trait Implementations§
impl Freeze for AffineParams
impl RefUnwindSafe for AffineParams
impl Send for AffineParams
impl Sync for AffineParams
impl Unpin for AffineParams
impl UnsafeUnpin for AffineParams
impl UnwindSafe for AffineParams
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