pub struct MixedPrecisionPolicy {
pub overrides: Vec<(String, LayerPrecision)>,
pub default: LayerPrecision,
}Expand description
Policy for choosing per-layer precision in mixed-precision quantization.
Maps global variable names to their target precision. Variables not listed in the policy use the default precision.
Fields§
§overrides: Vec<(String, LayerPrecision)>Per-variable precision overrides, keyed by variable name.
default: LayerPrecisionDefault precision for variables not in the overrides.
Implementations§
Source§impl MixedPrecisionPolicy
impl MixedPrecisionPolicy
Sourcepub fn precision_for(&self, name: &str) -> LayerPrecision
pub fn precision_for(&self, name: &str) -> LayerPrecision
Returns the precision for a variable with the given name.
Trait Implementations§
Source§impl Clone for MixedPrecisionPolicy
impl Clone for MixedPrecisionPolicy
Source§fn clone(&self) -> MixedPrecisionPolicy
fn clone(&self) -> MixedPrecisionPolicy
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 MixedPrecisionPolicy
impl RefUnwindSafe for MixedPrecisionPolicy
impl Send for MixedPrecisionPolicy
impl Sync for MixedPrecisionPolicy
impl Unpin for MixedPrecisionPolicy
impl UnsafeUnpin for MixedPrecisionPolicy
impl UnwindSafe for MixedPrecisionPolicy
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