malt.trainer.get_default_trainer
- malt.trainer.get_default_trainer(optimizer: str = 'Adam', learning_rate: float = 0.001, n_epochs: int = 10, batch_size: int = - 1, reduce_factor: float = 0.5, patience: int = 10, without_player: bool = False, min_learning_rate: float = 1e-06, no_validation_threshold=20)[source]
Get the default training scheme for models.
- Parameters
optimizer (str) – Name of the optimizer. Must be an attribute of torch.optim
learning_rate (float) – Initial learning rate.
n_epochs (int) – Maximum epochs.
batch_size (int) – Batch size.
validation_split (float) – Proportion of validation set.
reduce_factor (float) – Rate of learning rate reduction.
- Returns
Callable
- Return type
Trainer function.