mlr_callback_set.history {mlr3torch}R Documentation

History Callback

Description

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.

Super class

mlr3torch::CallbackSet -> CallbackSetHistory

Methods

Public methods

Inherited methods

Method on_begin()

Initializes lists where the train and validation metrics are stored.

Usage
CallbackSetHistory$on_begin()

Method state_dict()

Converts the lists to data.tables.

Usage
CallbackSetHistory$state_dict()

Method load_state_dict()

Sets the field ⁠$train⁠ and ⁠$valid⁠ to those contained in the state dict.

Usage
CallbackSetHistory$load_state_dict(state_dict)
Arguments
state_dict

(callback_state_history)
The state dict as retrieved via ⁠$state_dict()⁠.


Method on_before_valid()

Add the latest training scores to the history.

Usage
CallbackSetHistory$on_before_valid()

Method on_epoch_end()

Add the latest validation scores to the history.

Usage
CallbackSetHistory$on_epoch_end()

Method clone()

The objects of this class are cloneable with this method.

Usage
CallbackSetHistory$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


[Package mlr3torch version 0.1.0 Index]