vaeac_get_optimizer function

Function to create the optimizer used to train vaeac

Function to create the optimizer used to train vaeac

Only torch::optim_adam() is currently supported. But it is easy to add an additional option later.

vaeac_get_optimizer(vaeac_model, lr, optimizer_name = "adam")

Arguments

  • vaeac_model: A vaeac model created using vaeac().
  • lr: Positive numeric (default is 0.001). The learning rate used in the torch::optim_adam() optimizer.
  • optimizer_name: String containing the name of the torch::optimizer() to use.

Returns

A torch::optim_adam() optimizer connected to the parameters of the vaeac_model.

Author(s)

Lars Henry Berge Olsen