pub struct QuantTuple(pub f32, pub i32);Tuple Fields§
§0: f32§1: i32Trait Implementations§
Source§impl Clone for QuantTuple
impl Clone for QuantTuple
Source§fn clone(&self) -> QuantTuple
fn clone(&self) -> QuantTuple
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 QuantTuple
impl Debug for QuantTuple
Source§impl<'de> Deserialize<'de> for QuantTuple
impl<'de> Deserialize<'de> for QuantTuple
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<QuantTuple> for (f32, i32)
impl From<QuantTuple> for (f32, i32)
Source§fn from(value: QuantTuple) -> Self
fn from(value: QuantTuple) -> Self
Converts to this type from the input type.
Source§impl From<QuantTuple> for Quantization
impl From<QuantTuple> for Quantization
Source§fn from(quant_tuple: QuantTuple) -> Quantization
fn from(quant_tuple: QuantTuple) -> Quantization
Creates a new Quantization struct from a QuantTuple
§Examples
let quant_tuple = QuantTuple(0.1_f32, -128_i32);
let quant = Quantization::from(quant_tuple);
assert_eq!(quant.scale, 0.1);
assert_eq!(quant.zero_point, -128);Source§impl PartialEq for QuantTuple
impl PartialEq for QuantTuple
Source§impl Serialize for QuantTuple
impl Serialize for QuantTuple
impl Copy for QuantTuple
impl StructuralPartialEq for QuantTuple
Auto Trait Implementations§
impl Freeze for QuantTuple
impl RefUnwindSafe for QuantTuple
impl Send for QuantTuple
impl Sync for QuantTuple
impl Unpin for QuantTuple
impl UnsafeUnpin for QuantTuple
impl UnwindSafe for QuantTuple
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