Dictionary of torch loss descriptors.
See t_loss()
for conveniently retrieving a loss function.
Can be converted to a data.table
using
as.data.table
.
See also
Other Torch Descriptor:
TorchCallback
,
TorchDescriptor
,
TorchLoss
,
TorchOptimizer
,
as_torch_callbacks()
,
as_torch_loss()
,
as_torch_optimizer()
,
mlr3torch_optimizers
,
t_clbk()
,
t_loss()
,
t_opt()
Other Dictionary:
mlr3torch_callbacks
,
mlr3torch_optimizers
,
t_opt()
Examples
mlr3torch_losses$get("mse")
#> <TorchLoss:mse> Mean Squared Error
#> * Generator: nn_mse_loss
#> * Parameters: list()
#> * Packages: torch,mlr3torch
#> * Task Types: regr
# is equivalent to
t_loss("mse")
#> <TorchLoss:mse> Mean Squared Error
#> * Generator: nn_mse_loss
#> * Parameters: list()
#> * Packages: torch,mlr3torch
#> * Task Types: regr
# convert to a data.table
as.data.table(mlr3torch_losses)
#> Key: <key>
#> key label task_types packages
#> <char> <char> <list> <char>
#> 1: cross_entropy Cross Entropy classif torch,mlr3torch
#> 2: l1 Absolute Error regr torch,mlr3torch
#> 3: mse Mean Squared Error regr torch,mlr3torch