pub struct QuantizationConfigBuilder { /* private fields */ }Expand description
Builder for quantization configuration
Implementations§
Source§impl QuantizationConfigBuilder
impl QuantizationConfigBuilder
Sourcepub fn quantization_type(self, qtype: QuantizationType) -> Self
pub fn quantization_type(self, qtype: QuantizationType) -> Self
Sets the quantization type
Sourcepub fn mode(self, mode: QuantizationMode) -> Self
pub fn mode(self, mode: QuantizationMode) -> Self
Sets the quantization mode
Sourcepub fn per_channel(self, enable: bool) -> Self
pub fn per_channel(self, enable: bool) -> Self
Enables per-channel quantization
Sourcepub fn calibration_samples(self, count: usize) -> Self
pub fn calibration_samples(self, count: usize) -> Self
Sets calibration sample count
Sourcepub fn build(self) -> QuantizationConfig
pub fn build(self) -> QuantizationConfig
Builds the configuration
Trait Implementations§
Source§impl Debug for QuantizationConfigBuilder
impl Debug for QuantizationConfigBuilder
Source§impl Default for QuantizationConfigBuilder
impl Default for QuantizationConfigBuilder
Source§fn default() -> QuantizationConfigBuilder
fn default() -> QuantizationConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for QuantizationConfigBuilder
impl RefUnwindSafe for QuantizationConfigBuilder
impl Send for QuantizationConfigBuilder
impl Sync for QuantizationConfigBuilder
impl Unpin for QuantizationConfigBuilder
impl UnsafeUnpin for QuantizationConfigBuilder
impl UnwindSafe for QuantizationConfigBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more