pub struct LotteryTicketPrunerBuilder { /* private fields */ }Expand description
Builder for LotteryTicketPruner.
Implementations§
Source§impl LotteryTicketPrunerBuilder
impl LotteryTicketPrunerBuilder
Sourcepub fn target_sparsity(self, sparsity: f32) -> Self
pub fn target_sparsity(self, sparsity: f32) -> Self
Set target sparsity (0.0-1.0).
Sourcepub fn pruning_rounds(self, rounds: usize) -> Self
pub fn pruning_rounds(self, rounds: usize) -> Self
Set number of pruning rounds.
Sourcepub fn rewind_strategy(self, strategy: RewindStrategy) -> Self
pub fn rewind_strategy(self, strategy: RewindStrategy) -> Self
Set rewind strategy.
Sourcepub fn global_pruning(self, global: bool) -> Self
pub fn global_pruning(self, global: bool) -> Self
Enable global pruning across all layers.
Sourcepub fn build(self) -> LotteryTicketPruner
pub fn build(self) -> LotteryTicketPruner
Build the pruner.
Trait Implementations§
Source§impl Clone for LotteryTicketPrunerBuilder
impl Clone for LotteryTicketPrunerBuilder
Source§fn clone(&self) -> LotteryTicketPrunerBuilder
fn clone(&self) -> LotteryTicketPrunerBuilder
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 LotteryTicketPrunerBuilder
impl Debug for LotteryTicketPrunerBuilder
Source§impl Default for LotteryTicketPrunerBuilder
impl Default for LotteryTicketPrunerBuilder
Source§fn default() -> LotteryTicketPrunerBuilder
fn default() -> LotteryTicketPrunerBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LotteryTicketPrunerBuilder
impl RefUnwindSafe for LotteryTicketPrunerBuilder
impl Send for LotteryTicketPrunerBuilder
impl Sync for LotteryTicketPrunerBuilder
impl Unpin for LotteryTicketPrunerBuilder
impl UnsafeUnpin for LotteryTicketPrunerBuilder
impl UnwindSafe for LotteryTicketPrunerBuilder
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