pub struct QuantParamsI8 {
pub scale: f64,
pub zero_point: i8,
}Expand description
Quantization parameters for i8 tensors.
Maps integer range [zero_point - 128, zero_point + 127] to floating-point
via: float_value = scale * (int_value - zero_point)
Fields§
§scale: f64Scale factor: the step size between consecutive quantized values.
zero_point: i8Zero point: the integer value that maps to 0.0 in float.
Implementations§
Trait Implementations§
Source§impl Clone for QuantParamsI8
impl Clone for QuantParamsI8
Source§fn clone(&self) -> QuantParamsI8
fn clone(&self) -> QuantParamsI8
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 QuantParamsI8
impl Debug for QuantParamsI8
impl Copy for QuantParamsI8
Auto Trait Implementations§
impl Freeze for QuantParamsI8
impl RefUnwindSafe for QuantParamsI8
impl Send for QuantParamsI8
impl Sync for QuantParamsI8
impl Unpin for QuantParamsI8
impl UnsafeUnpin for QuantParamsI8
impl UnwindSafe for QuantParamsI8
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
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