LearningComponentsTypes

Trait LearningComponentsTypes 

pub trait LearningComponentsTypes {
    type Backend: AutodiffBackend;
    type LrScheduler: LrScheduler + 'static;
    type TrainingModel: TrainStep + AutodiffModule<Self::Backend, InnerModule = Self::InferenceModel> + Display + 'static;
    type InferenceModel: InferenceStep;
    type Optimizer: Optimizer<Self::TrainingModel, Self::Backend> + 'static;
}
Expand description

Components used for a model to learn, grouped in one trait.

Required Associated Types§

type Backend: AutodiffBackend

The backend used for training.

type LrScheduler: LrScheduler + 'static

The learning rate scheduler used for training.

type TrainingModel: TrainStep + AutodiffModule<Self::Backend, InnerModule = Self::InferenceModel> + Display + 'static

The model to train.

type InferenceModel: InferenceStep

The non-autodiff type of the model.

type Optimizer: Optimizer<Self::TrainingModel, Self::Backend> + 'static

The optimizer used for training.

Implementors§

§

impl<B, LR, M, O> LearningComponentsTypes for LearningComponentsMarker<B, LR, M, O>
where B: AutodiffBackend, LR: LrScheduler + 'static, M: TrainStep + AutodiffModule<B> + Display + 'static, <M as AutodiffModule<B>>::InnerModule: InferenceStep, O: Optimizer<M, B> + 'static,