[][src]Struct tract_hir::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>,
}

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>

Implementations

impl QParams[src]

pub fn new(dt: DatumType) -> QParams[src]

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

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

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

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

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

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

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

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

Trait Implementations

impl Clone for QParams[src]

impl Debug for QParams[src]

impl Hash for QParams[src]

Auto Trait Implementations

impl RefUnwindSafe for QParams

impl Send for QParams

impl Sync for QParams

impl Unpin for QParams

impl UnwindSafe for QParams

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

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

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.