Retrieves one or more TorchOptimizer
s from mlr3torch_optimizers
.
Works like mlr3::lrn()
and mlr3::lrns()
.
Arguments
- .key
(
character(1)
)
Key of the object to retrieve.- ...
(any)
See description ofdictionary_sugar_get
.- .keys
(
character()
)
The keys of the optimizers.
See also
Other Torch Descriptor:
TorchCallback
,
TorchDescriptor
,
TorchLoss
,
TorchOptimizer
,
as_torch_callbacks()
,
as_torch_loss()
,
as_torch_optimizer()
,
mlr3torch_losses
,
mlr3torch_optimizers
,
t_clbk()
,
t_loss()
Other Dictionary:
mlr3torch_callbacks
,
mlr3torch_losses
,
mlr3torch_optimizers
Examples
t_opt("adam", lr = 0.1)
#> <TorchOptimizer:adam> Adaptive Moment Estimation
#> * Generator: optim_adam
#> * Parameters: lr=0.1
#> * Packages: torch,mlr3torch
# get the dictionary
t_opt()
#> <DictionaryMlr3torchOptimizers> with 7 stored values
#> Keys: adadelta, adagrad, adam, asgd, rmsprop, rprop, sgd
t_opts(c("adam", "sgd"))
#> $adam
#> <TorchOptimizer:adam> Adaptive Moment Estimation
#> * Generator: optim_adam
#> * Parameters: list()
#> * Packages: torch,mlr3torch
#>
#> $sgd
#> <TorchOptimizer:sgd> Stochastic Gradient Descent
#> * Generator: optim_sgd
#> * Parameters: list()
#> * Packages: torch,mlr3torch
#>
# get the dictionary
t_opts()
#> <DictionaryMlr3torchOptimizers> with 7 stored values
#> Keys: adadelta, adagrad, adam, asgd, rmsprop, rprop, sgd