pub enum ImportanceMethod {
L1Norm,
L2Norm,
GradientWeighted,
TaylorExpansion,
Random {
seed: u64,
},
Movement,
Fisher,
}Expand description
Importance score computation method for unstructured pruning
Variants§
L1Norm
L1 norm (absolute value): |w|
L2Norm
L2 norm (squared magnitude): w^2
GradientWeighted
Gradient-weighted importance: |w * g|
TaylorExpansion
Taylor expansion: |w * g * a| or first-order Taylor approximation
Random
Random scores (baseline for comparison)
Movement
Movement-based: tracks weight changes during training
Fisher
Fisher information approximation: g^2 (gradient squared)
Trait Implementations§
Source§impl Clone for ImportanceMethod
impl Clone for ImportanceMethod
Source§fn clone(&self) -> ImportanceMethod
fn clone(&self) -> ImportanceMethod
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImportanceMethod
impl Debug for ImportanceMethod
Source§impl Default for ImportanceMethod
impl Default for ImportanceMethod
Source§fn default() -> ImportanceMethod
fn default() -> ImportanceMethod
Returns the “default value” for a type. Read more
Source§impl PartialEq for ImportanceMethod
impl PartialEq for ImportanceMethod
impl Copy for ImportanceMethod
impl StructuralPartialEq for ImportanceMethod
Auto Trait Implementations§
impl Freeze for ImportanceMethod
impl RefUnwindSafe for ImportanceMethod
impl Send for ImportanceMethod
impl Sync for ImportanceMethod
impl Unpin for ImportanceMethod
impl UnsafeUnpin for ImportanceMethod
impl UnwindSafe for ImportanceMethod
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> 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