pub struct QConv2DPerChannel<'a, const C: usize, const KH: usize, const KW: usize, const F: usize, const SH: usize = 1, const SW: usize = 1, const PT: usize = 0, const PB: usize = 0, const PL: usize = 0, const PR: usize = 0> {
pub weights: &'a [[[[i8; C]; KW]; KH]; F],
pub biases: Option<&'a [i32; F]>,
pub input_zero_point: i8,
pub requantizers: &'a [Requantizer; F],
}Expand description
QConv2D with one requantizer per filter, the per-channel weight
quantization TFLite applies to convolutions (C++ QConv2DPerChannel).
Fields§
§weights: &'a [[[[i8; C]; KW]; KH]; F]weights[f][kh][kw][c].
biases: Option<&'a [i32; F]>One i32 bias per filter, or None.
input_zero_point: i8The input tensor’s zero point, which also fills the padding.
requantizers: &'a [Requantizer; F]requantizers[f] rescales filter f’s outputs.
Implementations§
Trait Implementations§
Source§impl<'a, const C: usize, const KH: usize, const KW: usize, const F: usize, const SH: usize, const SW: usize, const PT: usize, const PB: usize, const PL: usize, const PR: usize> Clone for QConv2DPerChannel<'a, C, KH, KW, F, SH, SW, PT, PB, PL, PR>
impl<'a, const C: usize, const KH: usize, const KW: usize, const F: usize, const SH: usize, const SW: usize, const PT: usize, const PB: usize, const PL: usize, const PR: usize> Clone for QConv2DPerChannel<'a, C, KH, KW, F, SH, SW, PT, PB, PL, PR>
impl<'a, const C: usize, const KH: usize, const KW: usize, const F: usize, const SH: usize, const SW: usize, const PT: usize, const PB: usize, const PL: usize, const PR: usize> Copy for QConv2DPerChannel<'a, C, KH, KW, F, SH, SW, PT, PB, PL, PR>
Auto Trait Implementations§
impl<'a, const C: usize, const KH: usize, const KW: usize, const F: usize, const SH: usize, const SW: usize, const PT: usize, const PB: usize, const PL: usize, const PR: usize> Forget for QConv2DPerChannel<'a, C, KH, KW, F, SH, SW, PT, PB, PL, PR>
impl<'a, const C: usize, const KH: usize, const KW: usize, const F: usize, const SH: usize, const SW: usize, const PT: usize, const PB: usize, const PL: usize, const PR: usize> Freeze for QConv2DPerChannel<'a, C, KH, KW, F, SH, SW, PT, PB, PL, PR>
impl<'a, const C: usize, const KH: usize, const KW: usize, const F: usize, const SH: usize, const SW: usize, const PT: usize, const PB: usize, const PL: usize, const PR: usize> RefUnwindSafe for QConv2DPerChannel<'a, C, KH, KW, F, SH, SW, PT, PB, PL, PR>where
&'a [[[[i8; C]; KW]; KH]; F]: RefUnwindSafe,
Option<&'a [i32; F]>: RefUnwindSafe,
&'a [Requantizer; F]: RefUnwindSafe,
impl<'a, const C: usize, const KH: usize, const KW: usize, const F: usize, const SH: usize, const SW: usize, const PT: usize, const PB: usize, const PL: usize, const PR: usize> Send for QConv2DPerChannel<'a, C, KH, KW, F, SH, SW, PT, PB, PL, PR>
impl<'a, const C: usize, const KH: usize, const KW: usize, const F: usize, const SH: usize, const SW: usize, const PT: usize, const PB: usize, const PL: usize, const PR: usize> Sync for QConv2DPerChannel<'a, C, KH, KW, F, SH, SW, PT, PB, PL, PR>
impl<'a, const C: usize, const KH: usize, const KW: usize, const F: usize, const SH: usize, const SW: usize, const PT: usize, const PB: usize, const PL: usize, const PR: usize> Unpin for QConv2DPerChannel<'a, C, KH, KW, F, SH, SW, PT, PB, PL, PR>
impl<'a, const C: usize, const KH: usize, const KW: usize, const F: usize, const SH: usize, const SW: usize, const PT: usize, const PB: usize, const PL: usize, const PR: usize> UnsafeUnpin for QConv2DPerChannel<'a, C, KH, KW, F, SH, SW, PT, PB, PL, PR>where
&'a [[[[i8; C]; KW]; KH]; F]: UnsafeUnpin,
Option<&'a [i32; F]>: UnsafeUnpin,
&'a [Requantizer; F]: UnsafeUnpin,
impl<'a, const C: usize, const KH: usize, const KW: usize, const F: usize, const SH: usize, const SW: usize, const PT: usize, const PB: usize, const PL: usize, const PR: usize> UnwindSafe for QConv2DPerChannel<'a, C, KH, KW, F, SH, SW, PT, PB, PL, PR>where
&'a [[[[i8; C]; KW]; KH]; F]: UnwindSafe,
Option<&'a [i32; F]>: UnwindSafe,
&'a [Requantizer; F]: 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