pub struct FineTuningUtilities<F: Float + Debug> { /* private fields */ }
Expand description
Fine-tuning utilities
Implementations§
Source§impl<F: Float + Debug + 'static> FineTuningUtilities<F>
impl<F: Float + Debug + 'static> FineTuningUtilities<F>
Sourcepub fn set_layer_learning_rate(
&mut self,
layer_pattern: String,
learning_rate: f64,
) -> Result<()>
pub fn set_layer_learning_rate( &mut self, layer_pattern: String, learning_rate: f64, ) -> Result<()>
Set learning rate for a layer group
Sourcepub fn set_layer_gradient_clip(
&mut self,
layer_pattern: String,
clip_value: f64,
) -> Result<()>
pub fn set_layer_gradient_clip( &mut self, layer_pattern: String, clip_value: f64, ) -> Result<()>
Set gradient clipping for a layer group
Sourcepub fn set_layer_weight_decay(
&mut self,
layer_pattern: String,
weight_decay: f64,
) -> Result<()>
pub fn set_layer_weight_decay( &mut self, layer_pattern: String, weight_decay: f64, ) -> Result<()>
Set weight decay for a layer group
Sourcepub fn get_effective_learning_rate(&self, layer_name: &str, base_lr: F) -> F
pub fn get_effective_learning_rate(&self, layer_name: &str, base_lr: F) -> F
Get effective learning rate for a layer
Sourcepub fn get_gradient_clip(&self, layer_name: &str) -> Option<F>
pub fn get_gradient_clip(&self, layer_name: &str) -> Option<F>
Get gradient clip value for a layer
Sourcepub fn get_weight_decay(&self, layer_name: &str) -> Option<F>
pub fn get_weight_decay(&self, layer_name: &str) -> Option<F>
Get weight decay for a layer
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for FineTuningUtilities<F>
impl<F> RefUnwindSafe for FineTuningUtilities<F>where
F: RefUnwindSafe,
impl<F> Send for FineTuningUtilities<F>where
F: Send,
impl<F> Sync for FineTuningUtilities<F>where
F: Sync,
impl<F> Unpin for FineTuningUtilities<F>where
F: Unpin,
impl<F> UnwindSafe for FineTuningUtilities<F>where
F: UnwindSafe,
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> 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