pub struct NdArrayQTensor<Q: QuantElement> {
pub qtensor: NdArrayTensor<Q>,
pub scheme: QuantizationScheme,
pub qparams: Vec<QParams<f32, Q>>,
}
Expand description
A quantized tensor for the ndarray backend.
Fields§
§qtensor: NdArrayTensor<Q>
The quantized tensor.
scheme: QuantizationScheme
The quantization scheme.
qparams: Vec<QParams<f32, Q>>
The quantization parameters.
Implementations§
Source§impl<Q: QuantElement> NdArrayQTensor<Q>
impl<Q: QuantElement> NdArrayQTensor<Q>
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<Q: Clone + QuantElement> Clone for NdArrayQTensor<Q>
impl<Q: Clone + QuantElement> Clone for NdArrayQTensor<Q>
Source§fn clone(&self) -> NdArrayQTensor<Q>
fn clone(&self) -> NdArrayQTensor<Q>
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<Q: Debug + QuantElement> Debug for NdArrayQTensor<Q>
impl<Q: Debug + QuantElement> Debug for NdArrayQTensor<Q>
Source§impl<Q: QuantElement> QTensorPrimitive for NdArrayQTensor<Q>
impl<Q: QuantElement> QTensorPrimitive for NdArrayQTensor<Q>
Source§fn scheme(&self) -> &QuantizationScheme
fn scheme(&self) -> &QuantizationScheme
Returns the quantization scheme for the given tensor.
Source§impl<Q: QuantElement> TensorMetadata for NdArrayQTensor<Q>
impl<Q: QuantElement> TensorMetadata for NdArrayQTensor<Q>
Auto Trait Implementations§
impl<Q> Freeze for NdArrayQTensor<Q>
impl<Q> RefUnwindSafe for NdArrayQTensor<Q>where
Q: RefUnwindSafe,
impl<Q> Send for NdArrayQTensor<Q>
impl<Q> Sync for NdArrayQTensor<Q>
impl<Q> Unpin for NdArrayQTensor<Q>where
Q: Unpin,
impl<Q> UnwindSafe for NdArrayQTensor<Q>where
Q: RefUnwindSafe + 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
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