pub struct PruningConfigBuilder { /* private fields */ }Expand description
Builder for pruning configuration
Implementations§
Source§impl PruningConfigBuilder
impl PruningConfigBuilder
Sourcepub fn strategy(self, strategy: PruningStrategy) -> Self
pub fn strategy(self, strategy: PruningStrategy) -> Self
Sets the pruning strategy
Sourcepub fn sparsity_target(self, sparsity: f32) -> Self
pub fn sparsity_target(self, sparsity: f32) -> Self
Sets the sparsity target
Sourcepub fn schedule(self, schedule: PruningSchedule) -> Self
pub fn schedule(self, schedule: PruningSchedule) -> Self
Sets the pruning schedule
Sourcepub fn granularity(self, granularity: PruningGranularity) -> Self
pub fn granularity(self, granularity: PruningGranularity) -> Self
Sets the pruning granularity
Sourcepub fn fine_tune_epochs(self, epochs: usize) -> Self
pub fn fine_tune_epochs(self, epochs: usize) -> Self
Sets fine-tuning epochs
Sourcepub fn build(self) -> PruningConfig
pub fn build(self) -> PruningConfig
Builds the configuration
Trait Implementations§
Source§impl Debug for PruningConfigBuilder
impl Debug for PruningConfigBuilder
Source§impl Default for PruningConfigBuilder
impl Default for PruningConfigBuilder
Source§fn default() -> PruningConfigBuilder
fn default() -> PruningConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PruningConfigBuilder
impl RefUnwindSafe for PruningConfigBuilder
impl Send for PruningConfigBuilder
impl Sync for PruningConfigBuilder
impl Unpin for PruningConfigBuilder
impl UnsafeUnpin for PruningConfigBuilder
impl UnwindSafe for PruningConfigBuilder
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> 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