pub struct PerChannelQuantParams {
pub scales: Vec<f32>,
pub zero_points: Vec<i32>,
pub channel_axis: u32,
}Expand description
Per-channel quantization parameters.
Each output channel of a convolution weight tensor gets its own scale and zero-point, as required by the TFLite INT8 specification.
Fields§
§scales: Vec<f32>One scale per output channel.
zero_points: Vec<i32>One zero-point per output channel.
channel_axis: u32The axis along which per-channel quantization is applied (typically 0).
Implementations§
Source§impl PerChannelQuantParams
impl PerChannelQuantParams
Sourcepub fn num_channels(&self) -> usize
pub fn num_channels(&self) -> usize
Returns the number of channels.
Trait Implementations§
Source§impl Clone for PerChannelQuantParams
impl Clone for PerChannelQuantParams
Source§fn clone(&self) -> PerChannelQuantParams
fn clone(&self) -> PerChannelQuantParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PerChannelQuantParams
impl RefUnwindSafe for PerChannelQuantParams
impl Send for PerChannelQuantParams
impl Sync for PerChannelQuantParams
impl Unpin for PerChannelQuantParams
impl UnsafeUnpin for PerChannelQuantParams
impl UnwindSafe for PerChannelQuantParams
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