Loss Function Quick Access
Retrieve one or more TorchLoss
es from mlr3torch_losses
. Works like mlr3::lrn()
and mlr3::lrns()
.
t_loss(.key, ...) t_losses(.keys, ...)
.key
: (character(1)
)
Key of the object to retrieve.
...
: (any)
See description of dictionary_sugar_get
.
.keys
: (character()
)
The keys of the losses.
A TorchLoss
t_loss("mse", reduction = "mean") # get the dictionary t_loss() t_losses(c("mse", "l1")) # get the dictionary t_losses()
Other Torch Descriptor: TorchCallback
, TorchDescriptor
, TorchLoss
, TorchOptimizer
, as_torch_callbacks()
, as_torch_loss()
, as_torch_optimizer()
, mlr3torch_losses
, mlr3torch_optimizers
, t_clbk()
, t_opt()
Useful links