metallic.trainer¶
-
class
metallic.trainer.
Trainer
(metalearner: metallic.metalearners.base.MetaLearner, train_loader: metallic.data.dataloader.MetaDataLoader, val_loader: Optional[metallic.data.dataloader.MetaDataLoader] = None, n_epoches: int = 100, n_iters_per_epoch: int = 500, n_iters_test: int = 600, logger: Optional[metallic.utils.logger.Logger] = None)[source]¶ Bases:
object
A wrap of training procedure for meta-learning algorithms.
- Parameters
metalearner (MetaLearner) – An instance of
MetaLearner
classtrain_loader (MetaDataLoader)) – Train data loader, an instance of
MetaDataLoader
classval_loader (MetaDataLoader, optional) – Validation data loader, an instance of
MetaDataLoader
classn_epoches (int, optional, default=100) – Number of epoches
n_iters_per_epoch (int, optional, default=500) – Number of the iterations per epoch
n_iters_test (int, optional, default=600) – Number of the iterations during meta-test stage
logger (Logger, optional) – An instance of
Logger
class