mlr_pipeops_torch_callbacks | R Documentation |
Configures the callbacks of a deep learning model.
The parameters are defined dynamically from the callbacks, where the id of the respective callbacks is the respective set id.
There is one input channel "input"
and one output channel "output"
.
During training, the channels are of class ModelDescriptor
.
During prediction, the channels are of class Task
.
The state is the value calculated by the public method shapes_out()
.
During training the callbacks are cloned and added to the ModelDescriptor
.
mlr3pipelines::PipeOp
-> PipeOpTorchCallbacks
new()
Creates a new instance of this R6 class.
PipeOpTorchCallbacks$new( callbacks = list(), id = "torch_callbacks", param_vals = list() )
callbacks
(list
of TorchCallback
s)
The callbacks (or something convertible via as_torch_callbacks()
).
Must have unique ids.
All callbacks are cloned during construction.
id
(character(1)
)
Identifier of the resulting object.
param_vals
(list()
)
List of hyperparameter settings, overwriting the hyperparameter settings that would
otherwise be set during construction.
clone()
The objects of this class are cloneable with this method.
PipeOpTorchCallbacks$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other Model Configuration:
ModelDescriptor()
,
mlr_pipeops_torch_loss
,
mlr_pipeops_torch_optimizer
,
model_descriptor_union()
Other PipeOp:
mlr_pipeops_module
,
mlr_pipeops_torch_optimizer
po_cb = po("torch_callbacks", "checkpoint")
po_cb$param_set
mdin = po("torch_ingress_num")$train(list(tsk("iris")))
mdin[[1L]]$callbacks
mdout = po_cb$train(mdin)[[1L]]
mdout$callbacks
# Can be called again
po_cb1 = po("torch_callbacks", t_clbk("progress"))
mdout1 = po_cb1$train(list(mdout))[[1L]]
mdout1$callbacks
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.