| mlr_callback_set.progress | R Documentation |
Prints a progress bar and the metrics for training and validation.
This callback can be resumed without any problems.
CallbackSet -> CallbackSetProgress
CallbackSetProgress$new()Creates a new instance of this R6 class.
CallbackSetProgress$new(digits = 2)
digitsinteger(1)
The number of digits to print for the measures.
CallbackSetProgress$on_begin()Starts this run's timer.
CallbackSetProgress$on_begin()
CallbackSetProgress$on_epoch_begin()Initializes the progress bar for training.
CallbackSetProgress$on_epoch_begin()
CallbackSetProgress$on_batch_end()Increments the training progress bar.
CallbackSetProgress$on_batch_end()
CallbackSetProgress$on_before_valid()Creates the progress bar for validation.
CallbackSetProgress$on_before_valid()
CallbackSetProgress$on_batch_valid_end()Increments the validation progress bar.
CallbackSetProgress$on_batch_valid_end()
CallbackSetProgress$on_epoch_end()Prints a summary of the training and validation process.
CallbackSetProgress$on_epoch_end()
CallbackSetProgress$on_end()Prints the time at the end of training, and how long training took in total. A resumed run also reports how much of that total it contributed itself.
CallbackSetProgress$on_end()
CallbackSetProgress$state_dict()Returns the seconds trained so far, so that a resumed run reports the time of all runs together rather than only its own.
CallbackSetProgress$state_dict()
CallbackSetProgress$load_state_dict()Loads the time that the previous runs took.
CallbackSetProgress$load_state_dict(state_dict)
state_dict(named list())
The state dict as retrieved via $state_dict().
CallbackSetProgress$clone()The objects of this class are cloneable with this method.
CallbackSetProgress$clone(deep = FALSE)
deepWhether to make a deep clone.
Other Callback:
TorchCallback,
as_torch_callback(),
as_torch_callbacks(),
callback_set(),
mlr3torch_callbacks,
mlr_callback_set,
mlr_callback_set.checkpoint,
mlr_callback_set.tb,
mlr_callback_set.unfreeze,
mlr_context_torch,
t_clbk(),
torch_callback()
task = tsk("iris")
learner = lrn("classif.mlp", epochs = 5, batch_size = 1,
callbacks = t_clbk("progress"), validate = 0.3)
learner$param_set$set_values(
measures_train = msrs(c("classif.acc", "classif.ce")),
measures_valid = msr("classif.ce")
)
learner$train(task)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.