[]Struct tract_pulse::internal::tract_core::ops::quant::QParams

pub struct QParams {
    pub c_datum_type: DatumType,
    pub zero_point_a: Option<Arc<Tensor>>,
    pub zero_point_b: Option<Arc<Tensor>>,
    pub zero_point_c: Option<Arc<Tensor>>,
    pub scale_factor: Option<f32>,
    pub inputs_kind: Option<SmallVec<[QParamsInputKind; 4]>>,
}

Fields

c_datum_type: DatumTypezero_point_a: Option<Arc<Tensor>>zero_point_b: Option<Arc<Tensor>>zero_point_c: Option<Arc<Tensor>>scale_factor: Option<f32>inputs_kind: Option<SmallVec<[QParamsInputKind; 4]>>

Implementations

impl QParams

pub fn new(dt: DatumType) -> QParams

pub fn with_zero_point_a(self, zero_point: &Arc<Tensor>) -> QParams

pub fn with_zero_point_b(self, zero_point: &Arc<Tensor>) -> QParams

pub fn with_zero_point_c(self, zero_point: &Arc<Tensor>) -> QParams

pub fn with_scale_factor(self, scale_factor: f32) -> QParams

pub fn with_inputs_kind(
    self,
    inputs_kind: SmallVec<[QParamsInputKind; 4]>
) -> QParams

pub fn set_zero_point_a(&mut self, zero_point: &Arc<Tensor>)

pub fn set_zero_point_b(&mut self, zero_point: &Arc<Tensor>)

pub fn set_zero_point_c(&mut self, zero_point: &Arc<Tensor>)

pub fn set_scale_factor(&mut self, scale_factor: f32)

pub fn set_inputs_kind(&mut self, inputs_kind: SmallVec<[QParamsInputKind; 4]>)

pub fn inject_into_mmm(
    &self,
    mmm: &mut (dyn MatMatMul + 'static)
) -> Result<(), Error>

Trait Implementations

impl Clone for QParams

impl Debug for QParams

impl Hash for QParams

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.