pub enum PruneGranularity {
Channel {
n_out: usize,
n_in: usize,
},
Filter {
n_filters: usize,
filter_size: usize,
},
Head {
n_heads: usize,
head_dim: usize,
},
}Expand description
Structural unit to remove during pruning.
Variants§
Channel
Prune entire output channels (rows) of a weight matrix [n_out, n_in].
Fields
Filter
Prune entire convolutional filters, each of length filter_size.
Fields
Head
Prune entire attention heads in a projection matrix.
Trait Implementations§
Source§impl Clone for PruneGranularity
impl Clone for PruneGranularity
Source§fn clone(&self) -> PruneGranularity
fn clone(&self) -> PruneGranularity
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 PruneGranularity
impl Debug for PruneGranularity
Source§impl PartialEq for PruneGranularity
impl PartialEq for PruneGranularity
impl Copy for PruneGranularity
impl Eq for PruneGranularity
impl StructuralPartialEq for PruneGranularity
Auto Trait Implementations§
impl Freeze for PruneGranularity
impl RefUnwindSafe for PruneGranularity
impl Send for PruneGranularity
impl Sync for PruneGranularity
impl Unpin for PruneGranularity
impl UnsafeUnpin for PruneGranularity
impl UnwindSafe for PruneGranularity
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