pub struct TchQTensor {
pub qtensor: TchTensor,
pub scheme: QuantizationScheme,
}Expand description
A quantized tensor for the tch backend.
Fields§
§qtensor: TchTensorThe quantized tensor.
scheme: QuantizationSchemeThe quantization scheme.
Implementations§
Source§impl TchQTensor
impl TchQTensor
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 TchQTensor
impl Clone for TchQTensor
Source§fn clone(&self) -> TchQTensor
fn clone(&self) -> TchQTensor
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 Debug for TchQTensor
impl Debug for TchQTensor
Source§impl QTensorPrimitive for TchQTensor
impl QTensorPrimitive for TchQTensor
Source§fn scheme(&self) -> &QuantizationScheme
fn scheme(&self) -> &QuantizationScheme
Returns the quantization scheme for the given tensor.
Auto Trait Implementations§
impl Freeze for TchQTensor
impl RefUnwindSafe for TchQTensor
impl Send for TchQTensor
impl Sync for TchQTensor
impl Unpin for TchQTensor
impl UnwindSafe for TchQTensor
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