| callback_set {mlr3torch} | R Documentation |
Create a Set of Callbacks for Torch
Description
Creates an R6ClassGenerator inheriting from CallbackSet.
Additionally performs checks such as that the stages are not accidentally misspelled.
To create a TorchCallback use torch_callback().
In order for the resulting class to be cloneable, the private method $deep_clone() must be
provided.
Usage
callback_set(
classname,
on_begin = NULL,
on_end = NULL,
on_exit = NULL,
on_epoch_begin = NULL,
on_before_valid = NULL,
on_epoch_end = NULL,
on_batch_begin = NULL,
on_batch_end = NULL,
on_after_backward = NULL,
on_batch_valid_begin = NULL,
on_batch_valid_end = NULL,
on_valid_end = NULL,
state_dict = NULL,
load_state_dict = NULL,
initialize = NULL,
public = NULL,
private = NULL,
active = NULL,
parent_env = parent.frame(),
inherit = CallbackSet,
lock_objects = FALSE
)
Arguments
classname |
( |
on_begin, on_end, on_epoch_begin, on_before_valid, on_epoch_end, on_batch_begin, on_batch_end, on_after_backward, on_batch_valid_begin, on_batch_valid_end, on_valid_end, on_exit |
( |
state_dict |
( |
load_state_dict |
( |
initialize |
( |
public, private, active |
( |
parent_env |
( |
inherit |
( |
lock_objects |
( |
Value
See Also
Other Callback:
TorchCallback,
as_torch_callback(),
as_torch_callbacks(),
mlr3torch_callbacks,
mlr_callback_set,
mlr_callback_set.checkpoint,
mlr_callback_set.progress,
mlr_context_torch,
t_clbk(),
torch_callback()