Abstract Base Class from which TorchLoss, TorchOptimizer, and TorchCallback inherit.
This class wraps a generator (R6Class Generator or the torch version of such a generator) and annotates it
with metadata such as a ParamSet, a label, an ID, packages, or a manual page.
The parameters are the construction arguments of the wrapped generator and the parameter $values are passed
to the generator when calling the public method $generate().
Parameters
Defined by the constructor argument param_set.
All parameters are tagged with "train", but this is done automatically during initialize.
See also
Other Torch Descriptor:
TorchCallback,
TorchLoss,
TorchOptimizer,
as_torch_callbacks(),
as_torch_loss(),
as_torch_optimizer(),
mlr3torch_losses,
mlr3torch_optimizers,
t_clbk(),
t_loss(),
t_opt()
Public fields
label(
character(1))
Label for this object. Can be used in tables, plot and text output instead of the ID.param_set(
ParamSet)
Set of hyperparameters.packages(
character(1))
Set of required packages. These packages are loaded, but not attached.id(
character(1))
Identifier of the object. Used in tables, plot and text output.generatorThe wrapped generator that is described.
man(
character(1))
String in the format[pkg]::[topic]pointing to a manual page for this object.
Active bindings
phash(
character(1))
Hash (unique identifier) for this partial object, excluding some components which are varied systematically (e.g. the parameter values).
Methods
Method new()
Creates a new instance of this R6 class.
Usage
TorchDescriptor$new(
generator,
id = NULL,
param_set = NULL,
packages = NULL,
label = NULL,
man = NULL,
additional_args = NULL
)Arguments
generatorThe wrapped generator that is described.
id(
character(1))
The id for of the new object.param_set(
ParamSet)
The parameter set.packages(
character())
The R packages this object depends on.label(
character(1))
Label for the new instance.man(
character(1))
String in the format[pkg]::[topic]pointing to a manual page for this object. The referenced help package can be opened via method$help().additional_args(
list())
Additional arguments if necessary. For learning rate schedulers, this is the torch::LRScheduler.