pub enum PruningMethod {
MagnitudeBased {
threshold: f64,
},
TopK {
k: usize,
},
Structured {
granularity: StructuredGranularity,
},
GradualMagnitude {
initial_sparsity: f64,
final_sparsity: f64,
begin_step: usize,
end_step: usize,
},
}
Expand description
Pruning method
Variants§
MagnitudeBased
Magnitude-based pruning
TopK
Top-k pruning (keep only k largest weights)
Structured
Structured pruning (remove entire channels/filters)
Fields
§
granularity: StructuredGranularity
Granularity level for structured pruning
GradualMagnitude
Gradual magnitude pruning
Trait Implementations§
Source§impl Clone for PruningMethod
impl Clone for PruningMethod
Source§fn clone(&self) -> PruningMethod
fn clone(&self) -> PruningMethod
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PruningMethod
impl Debug for PruningMethod
Source§impl PartialEq for PruningMethod
impl PartialEq for PruningMethod
impl StructuralPartialEq for PruningMethod
Auto Trait Implementations§
impl Freeze for PruningMethod
impl RefUnwindSafe for PruningMethod
impl Send for PruningMethod
impl Sync for PruningMethod
impl Unpin for PruningMethod
impl UnwindSafe for PruningMethod
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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