pub struct FakeQuantize { /* private fields */ }Expand description
Fake quantization for QAT (simulates quantization during training).
Implementations§
Source§impl FakeQuantize
impl FakeQuantize
Sourcepub fn new(params: QuantizationParams) -> Self
pub fn new(params: QuantizationParams) -> Self
Create a new fake quantization module.
Sourcepub fn set_enabled(&mut self, enabled: bool)
pub fn set_enabled(&mut self, enabled: bool)
Enable or disable fake quantization.
Sourcepub fn forward_batch(&self, values: &[f64]) -> Vec<f64>
pub fn forward_batch(&self, values: &[f64]) -> Vec<f64>
Simulate quantization on a batch of values.
Auto Trait Implementations§
impl Freeze for FakeQuantize
impl RefUnwindSafe for FakeQuantize
impl Send for FakeQuantize
impl Sync for FakeQuantize
impl Unpin for FakeQuantize
impl UnwindSafe for FakeQuantize
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