SupervisedLearningStrategy

Trait SupervisedLearningStrategy 

Source
pub trait SupervisedLearningStrategy<LC: LearningComponentsTypes> {
    // Required method
    fn fit(
        &self,
        training_components: TrainingComponents<LC>,
        learner: Learner<LC>,
        dataloader_train: TrainLoader<LC>,
        dataloader_valid: ValidLoader<LC>,
        starting_epoch: usize,
    ) -> (TrainingModel<LC>, SupervisedTrainingEventProcessor<LC>);

    // Provided method
    fn train(
        &self,
        learner: Learner<LC>,
        dataloader_train: TrainLoader<LC>,
        dataloader_valid: ValidLoader<LC>,
        training_components: TrainingComponents<LC>,
    ) -> LearningResult<<LC as LearningComponentsTypes>::InferenceModel> { ... }
}
Expand description

Provides the fit function for any learning strategy

Required Methods§

Source

fn fit( &self, training_components: TrainingComponents<LC>, learner: Learner<LC>, dataloader_train: TrainLoader<LC>, dataloader_valid: ValidLoader<LC>, starting_epoch: usize, ) -> (TrainingModel<LC>, SupervisedTrainingEventProcessor<LC>)

Training loop for this strategy

Provided Methods§

Source

fn train( &self, learner: Learner<LC>, dataloader_train: TrainLoader<LC>, dataloader_valid: ValidLoader<LC>, training_components: TrainingComponents<LC>, ) -> LearningResult<<LC as LearningComponentsTypes>::InferenceModel>

Train the learner’s model with this strategy.

Implementors§