pub struct TransferLearningManager<T: FloatBounds> { /* private fields */ }Expand description
Transfer learning manager for handling model adaptation
Implementations§
Source§impl<T: FloatBounds + ScalarOperand> TransferLearningManager<T>
impl<T: FloatBounds + ScalarOperand> TransferLearningManager<T>
Sourcepub fn new(config: TransferConfig<T>) -> Self
pub fn new(config: TransferConfig<T>) -> Self
Create a new transfer learning manager
Sourcepub fn freeze_layers(&mut self, layer_names: &[String]) -> NeuralResult<()>
pub fn freeze_layers(&mut self, layer_names: &[String]) -> NeuralResult<()>
Freeze specific layers in a model
Sourcepub fn unfreeze_layers(&mut self, layer_names: &[String]) -> NeuralResult<()>
pub fn unfreeze_layers(&mut self, layer_names: &[String]) -> NeuralResult<()>
Unfreeze specific layers in a model
Sourcepub fn is_layer_frozen(&self, layer_name: &str) -> bool
pub fn is_layer_frozen(&self, layer_name: &str) -> bool
Check if a layer is frozen
Sourcepub fn get_layer_lr_multiplier(&self, layer_name: &str) -> T
pub fn get_layer_lr_multiplier(&self, layer_name: &str) -> T
Get learning rate multiplier for a layer
Sourcepub fn update_epoch(&mut self, epoch: usize) -> NeuralResult<()>
pub fn update_epoch(&mut self, epoch: usize) -> NeuralResult<()>
Update epoch and apply scheduling
Sourcepub fn apply_discriminative_learning_rates(
&mut self,
layer_names: &[String],
) -> NeuralResult<()>
pub fn apply_discriminative_learning_rates( &mut self, layer_names: &[String], ) -> NeuralResult<()>
Apply discriminative learning rates
Sourcepub fn record_metrics(&mut self, metrics: TransferMetrics<T>)
pub fn record_metrics(&mut self, metrics: TransferMetrics<T>)
Record training metrics
Sourcepub fn get_training_history(&self) -> &[TransferMetrics<T>]
pub fn get_training_history(&self) -> &[TransferMetrics<T>]
Get training history
Sourcepub fn calculate_transfer_effectiveness(&self) -> Option<T>
pub fn calculate_transfer_effectiveness(&self) -> Option<T>
Calculate transfer learning effectiveness
Trait Implementations§
Source§impl<T: Clone + FloatBounds> Clone for TransferLearningManager<T>
impl<T: Clone + FloatBounds> Clone for TransferLearningManager<T>
Source§fn clone(&self) -> TransferLearningManager<T>
fn clone(&self) -> TransferLearningManager<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for TransferLearningManager<T>where
T: Freeze,
impl<T> RefUnwindSafe for TransferLearningManager<T>where
T: RefUnwindSafe,
impl<T> Send for TransferLearningManager<T>
impl<T> Sync for TransferLearningManager<T>
impl<T> Unpin for TransferLearningManager<T>where
T: Unpin,
impl<T> UnsafeUnpin for TransferLearningManager<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for TransferLearningManager<T>where
T: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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