Trainers
class TabularTrainer
TabularTrainer.__init__
Trainer for a TabularModel
.
Arguments:
model
- ATabularModel
instance.
TabularTrainer.train
Train the input model with the input dataset.
Arguments:
data
- ARelationalData
object containing the training data.n_epochs
- The desired number of training epochs.batch_size
- The size of a batch of data during training. When it is not specified the user must provide the argumentmemory
.lr
- The learning rate. If it is 0 the optimal value for the learning rate is automatically determined.memory
- The available memory in MB that is used to automatically compute the optimal value of the batch size.valid
- AValidation
object. If None, no validation is performed.hooks
- A sequence of customTrainHook
objects.accumulate_grad
- The number of gradient accumulation steps. If equal to 1, the weights are updated at each step.
class TextTrainer
TextTrainer.__init__
Trainer for a TextModel
.
Arguments:
model
- ATextModel
instance.
TextTrainer.train
Train the input model with the input dataset.
Arguments:
data
- ARelationalData
object containing the training data.n_epochs
- The desired number of training epochs.batch_size
- The size of a batch of data during training. When it is not specified the user must provide the argumentmemory
.lr
- The learning rate. If it is 0 the optimal value for the learning rate is automatically determined.memory
- The available memory in MB that is used to automatically compute the optimal value of the batch size.valid
- AValidation
object. If None, no validation is performed.hooks
- A sequence of customTrainHook
objects.accumulate_grad
- The number of gradient accumulation steps. If equal to 1, the weights are updated at each step.