Struct QuantizationParametersPrimitive
pub struct QuantizationParametersPrimitive<B>where
B: Backend,{
pub scale: <B as Backend>::FloatTensorPrimitive,
pub offset: Option<<B as Backend>::IntTensorPrimitive>,
}
Expand description
The quantization parameters primitive.
§Remarks
This is a low-level struct used internally by the library to provide the quantization parameters to the backends. It is not designed for direct usage by users, and not recommended to import or use this struct directly.
Users should prefer the QuantizationParameters struct, which is designed for public use.
Fields§
§scale: <B as Backend>::FloatTensorPrimitive
The scaling factor.
offset: Option<<B as Backend>::IntTensorPrimitive>
The zero-point offset.
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for QuantizationParametersPrimitive<B>
impl<B> RefUnwindSafe for QuantizationParametersPrimitive<B>
where
<B as Backend>::FloatTensorPrimitive:
RefUnwindSafe,
<B as Backend>::IntTensorPrimitive: RefUnwindSafe,
impl<B> Send for QuantizationParametersPrimitive<B>
impl<B> Sync for QuantizationParametersPrimitive<B>
impl<B> Unpin for QuantizationParametersPrimitive<B>
impl<B> UnwindSafe for QuantizationParametersPrimitive<B>
where
<B as Backend>::FloatTensorPrimitive:
UnwindSafe,
<B as Backend>::IntTensorPrimitive: UnwindSafe,
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
§
impl<T> Instrument for T
impl<T> Instrument for T
§
fn instrument(self, span: Span) ->
Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§
fn in_current_span(self) ->
Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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
more
Source§
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