setup_optimizer: Instantiate an optimizer for training an EQRN_iid network

setup_optimizerR Documentation

Instantiate an optimizer for training an EQRN_iid network

Description

Instantiate an optimizer for training an EQRN_iid network

Usage

setup_optimizer(network, learning_rate, L2_pen, hidden_fct, optim_met = "adam")

Arguments

network

A torch::nn_module network to be trained in EQRN_fit().

learning_rate

Initial learning rate for the optimizer during training of the neural network.

L2_pen

L2 weight penalty parameter for regularization during training.

hidden_fct

Activation function for the hidden layers. Can be either a callable function (preferably from the torch library), or one of the the strings "SNN", "SSNN" for self normalizing networks (with common or separated networks for the scale and shape estimates, respectively). This will affect the default choice of optimizer.

optim_met

DEPRECATED. Optimization algorithm to use during training. "adam" is the default.

Value

A torch::optimizer object used in EQRN_fit() for training.


EQRN documentation built on April 4, 2025, 12:45 a.m.