pub struct QDensePerChannel<'a, const IN: usize, const OUT: usize> {
pub weights: &'a [[i8; IN]; OUT],
pub biases: Option<&'a [i32; OUT]>,
pub input_zero_point: i8,
pub requantizers: &'a [Requantizer; OUT],
}Expand description
A quantized fully connected layer with one Requantizer per output: the
per-channel weight quantization TFLite applies to dense layers by default
(C++ QPointwiseConv2DPerChannel over a 1x1 input, which is a dense layer).
Otherwise the same as QDense.
Fields§
§weights: &'a [[i8; IN]; OUT]weights[o][i]: weight from input i to output o.
biases: Option<&'a [i32; OUT]>One i32 bias per output, or None.
input_zero_point: i8The input tensor’s zero point.
requantizers: &'a [Requantizer; OUT]requantizers[o] rescales output o.
Implementations§
Trait Implementations§
impl<'a, const IN: usize, const OUT: usize> Copy for QDensePerChannel<'a, IN, OUT>
Auto Trait Implementations§
impl<'a, const IN: usize, const OUT: usize> Freeze for QDensePerChannel<'a, IN, OUT>
impl<'a, const IN: usize, const OUT: usize> RefUnwindSafe for QDensePerChannel<'a, IN, OUT>
impl<'a, const IN: usize, const OUT: usize> Send for QDensePerChannel<'a, IN, OUT>
impl<'a, const IN: usize, const OUT: usize> Sync for QDensePerChannel<'a, IN, OUT>
impl<'a, const IN: usize, const OUT: usize> Unpin for QDensePerChannel<'a, IN, OUT>
impl<'a, const IN: usize, const OUT: usize> UnsafeUnpin for QDensePerChannel<'a, IN, OUT>
impl<'a, const IN: usize, const OUT: usize> UnwindSafe for QDensePerChannel<'a, IN, OUT>
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