mlr_callback_set.history {mlr3torch} | R Documentation |
Saves the training and validation history during training.
The history is saved as a data.table in the $train
and $valid
slots.
The first column is always epoch
.
mlr3torch::CallbackSet
-> CallbackSetHistory
on_begin()
Initializes lists where the train and validation metrics are stored.
CallbackSetHistory$on_begin()
state_dict()
Converts the lists to data.tables.
CallbackSetHistory$state_dict()
load_state_dict()
Sets the field $train
and $valid
to those contained in the state dict.
CallbackSetHistory$load_state_dict(state_dict)
state_dict
(callback_state_history
)
The state dict as retrieved via $state_dict()
.
on_before_valid()
Add the latest training scores to the history.
CallbackSetHistory$on_before_valid()
on_epoch_end()
Add the latest validation scores to the history.
CallbackSetHistory$on_epoch_end()
clone()
The objects of this class are cloneable with this method.
CallbackSetHistory$clone(deep = FALSE)
deep
Whether to make a deep clone.