Skip to main content

QPointwiseConv2DPerChannel

Struct QPointwiseConv2DPerChannel 

Source
pub struct QPointwiseConv2DPerChannel<'a, const C: usize, const F: usize> {
    pub weights: &'a [[i8; C]; F],
    pub biases: Option<&'a [i32; F]>,
    pub input_zero_point: i8,
    pub requantizers: &'a [Requantizer; F],
}
Expand description

QPointwiseConv2D with one requantizer per filter (C++ QPointwiseConv2DPerChannel). For a single pixel this is QDensePerChannel.

Fields§

§weights: &'a [[i8; C]; F]

weights[f][c].

§biases: Option<&'a [i32; F]>

One i32 bias per filter, or None.

§input_zero_point: i8

The input tensor’s zero point.

§requantizers: &'a [Requantizer; F]

requantizers[f] rescales filter f’s outputs.

Implementations§

Source§

impl<const C: usize, const F: usize> QPointwiseConv2DPerChannel<'_, C, F>

Source

pub fn forward<const H: usize, const W: usize>( &self, input: &[[[i8; C]; W]; H], output: &mut [[[i8; F]; W]; H], )

One forward pass; see QPointwiseConv2D::forward.

Trait Implementations§

Source§

impl<'a, const C: usize, const F: usize> Clone for QPointwiseConv2DPerChannel<'a, C, F>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, const C: usize, const F: usize> Copy for QPointwiseConv2DPerChannel<'a, C, F>

Source§

impl<'a, const C: usize, const F: usize> Debug for QPointwiseConv2DPerChannel<'a, C, F>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, const C: usize, const F: usize> Freeze for QPointwiseConv2DPerChannel<'a, C, F>

§

impl<'a, const C: usize, const F: usize> RefUnwindSafe for QPointwiseConv2DPerChannel<'a, C, F>

§

impl<'a, const C: usize, const F: usize> Send for QPointwiseConv2DPerChannel<'a, C, F>

§

impl<'a, const C: usize, const F: usize> Sync for QPointwiseConv2DPerChannel<'a, C, F>

§

impl<'a, const C: usize, const F: usize> Unpin for QPointwiseConv2DPerChannel<'a, C, F>

§

impl<'a, const C: usize, const F: usize> UnsafeUnpin for QPointwiseConv2DPerChannel<'a, C, F>

§

impl<'a, const C: usize, const F: usize> UnwindSafe for QPointwiseConv2DPerChannel<'a, C, F>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.