pub struct AffineQuantization<E: Float + Send + Sync, Q: PrimInt + Send + Sync, A: PrimInt> {
pub scale: E,
pub offset: Q,
/* private fields */
}Expand description
Affine quantization scheme.
Note that the accumulation type A should have a bigger range than quantized type Q.
Fields§
§scale: EThe scaling factor.
offset: QThe zero-point offset.
Implementations§
Trait Implementations§
Source§impl<E: Clone + Float + Send + Sync, Q: Clone + PrimInt + Send + Sync, A: Clone + PrimInt> Clone for AffineQuantization<E, Q, A>
impl<E: Clone + Float + Send + Sync, Q: Clone + PrimInt + Send + Sync, A: Clone + PrimInt> Clone for AffineQuantization<E, Q, A>
Source§fn clone(&self) -> AffineQuantization<E, Q, A>
fn clone(&self) -> AffineQuantization<E, Q, A>
Returns a copy 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<E: Debug + Float + Send + Sync, Q: Debug + PrimInt + Send + Sync, A: Debug + PrimInt> Debug for AffineQuantization<E, Q, A>
impl<E: Debug + Float + Send + Sync, Q: Debug + PrimInt + Send + Sync, A: Debug + PrimInt> Debug for AffineQuantization<E, Q, A>
Source§impl<'de, E, Q, A: PrimInt> Deserialize<'de> for AffineQuantization<E, Q, A>
impl<'de, E, Q, A: PrimInt> Deserialize<'de> for AffineQuantization<E, Q, A>
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<E: Float + Send + Sync, Q: PrimInt + Hash + Send + Sync, A: PrimInt> Hash for AffineQuantization<E, Q, A>
impl<E: Float + Send + Sync, Q: PrimInt + Hash + Send + Sync, A: PrimInt> Hash for AffineQuantization<E, Q, A>
Source§impl<E: Float + Send + Sync, Q: PrimInt + Send + Sync, A: PrimInt> PartialEq for AffineQuantization<E, Q, A>
impl<E: Float + Send + Sync, Q: PrimInt + Send + Sync, A: PrimInt> PartialEq for AffineQuantization<E, Q, A>
Source§impl<E: Float + Send + Sync, Q: PrimInt + Send + Sync, A: PrimInt + Send + Sync> Quantization<E, Q> for AffineQuantization<E, Q, A>
impl<E: Float + Send + Sync, Q: PrimInt + Send + Sync, A: PrimInt + Send + Sync> Quantization<E, Q> for AffineQuantization<E, Q, A>
Source§impl<E, Q, A: PrimInt> Serialize for AffineQuantization<E, Q, A>
impl<E, Q, A: PrimInt> Serialize for AffineQuantization<E, Q, A>
impl<E: Copy + Float + Send + Sync, Q: Copy + PrimInt + Send + Sync, A: Copy + PrimInt> Copy for AffineQuantization<E, Q, A>
impl<E: Float + Send + Sync, Q: PrimInt + Send + Sync, A: PrimInt> Eq for AffineQuantization<E, Q, A>
Auto Trait Implementations§
impl<E, Q, A> Freeze for AffineQuantization<E, Q, A>
impl<E, Q, A> RefUnwindSafe for AffineQuantization<E, Q, A>
impl<E, Q, A> Send for AffineQuantization<E, Q, A>where
A: Send,
impl<E, Q, A> Sync for AffineQuantization<E, Q, A>where
A: Sync,
impl<E, Q, A> Unpin for AffineQuantization<E, Q, A>
impl<E, Q, A> UnwindSafe for AffineQuantization<E, Q, A>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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