set_opt_hparams: Set optimizer hyper-parameters

View source: R/module.R

set_opt_hparamsR Documentation

Set optimizer hyper-parameters

Description

This function is used to define hyper-parameters for the optimizer initialization method.

Usage

set_opt_hparams(module, ...)

Arguments

module

An nn_module that has been setup().

...

The parameters passed here will be used to initialize the optimizers. For example, if your optimizer is optim_adam and you pass lr=0.1, then the optim_adam function is called with optim_adam(parameters, lr=0.1) when fitting the model.

Value

The same luz module

See Also

Other set_hparam: set_hparams()


mlverse/torchlight documentation built on Sept. 19, 2024, 11:22 p.m.