pub struct NdArrayQTensor {
pub qtensor: NdArrayTensor,
pub scheme: QuantScheme,
pub qparams: Vec<QParams<f32>>,
}Expand description
A quantized tensor for the ndarray backend.
Fields§
§qtensor: NdArrayTensorThe quantized tensor.
scheme: QuantSchemeThe quantization scheme.
qparams: Vec<QParams<f32>>The quantization parameters.
Implementations§
Source§impl NdArrayQTensor
impl NdArrayQTensor
Sourcepub fn strategy(&self) -> QuantizationStrategy
pub fn strategy(&self) -> QuantizationStrategy
Returns the quantization strategy, including quantization parameters, for the given tensor.
Trait Implementations§
Source§impl Clone for NdArrayQTensor
impl Clone for NdArrayQTensor
Source§fn clone(&self) -> NdArrayQTensor
fn clone(&self) -> NdArrayQTensor
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 NdArrayQTensor
impl Debug for NdArrayQTensor
Source§impl QTensorPrimitive for NdArrayQTensor
impl QTensorPrimitive for NdArrayQTensor
Source§fn scheme(&self) -> &QuantScheme
fn scheme(&self) -> &QuantScheme
Returns the quantization settings for the given tensor.
Source§fn default_scheme() -> QuantScheme
fn default_scheme() -> QuantScheme
Returns the default tensor quantization scheme.
Source§fn acc_precision(&self) -> QuantAcc
fn acc_precision(&self) -> QuantAcc
The precision used for the accumulation in various kernels.
Source§fn propagation(&self) -> QuantPropagation
fn propagation(&self) -> QuantPropagation
How quantization is propagated during computation.
Auto Trait Implementations§
impl Freeze for NdArrayQTensor
impl RefUnwindSafe for NdArrayQTensor
impl Send for NdArrayQTensor
impl Sync for NdArrayQTensor
impl Unpin for NdArrayQTensor
impl UnwindSafe for NdArrayQTensor
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