MtMPretrain#
- class pretrain.models.MtMPretrain(cfg, rank, world_size)[source]#
Bases:
core.trainer.BaseTrainerMasked spike modelling for MtM, whose masks carry a mode token.
- setup(ckpt)[source]#
Set up the trainer.
This method is called after setting up distributed, loading the checkpoint, and setting up logging.
- val_epoch()[source]#
Perform a validation epoch.
Called every val.every_n_epochs epochs, and at the end of training.
- Returns:
bool, True if early stopping should be triggered, False (or falsey) otherwise.
- Return type:
early_stop