config_lr_scheduler {cito}R Documentation

Creation of customized learning rate scheduler objects

Description

Helps create custom learning rate schedulers for dnn.

Usage

config_lr_scheduler(
  type = c("lambda", "multiplicative", "one_cycle", "step"),
  verbose = FALSE,
  ...
)

Arguments

type

String defining which type of scheduler should be used. See Details.

verbose

If TRUE, additional information about scheduler will be printed to console.

...

additional arguments to be passed to scheduler. See Details.

Details

different learning rate scheduler need different variables, these functions will tell you which variables can be set:

Value

object of class cito_lr_scheduler to give to dnn

Examples


if(torch::torch_is_installed()){
library(cito)

# create learning rate scheduler object
scheduler <- config_lr_scheduler(type = "step",
                        step_size = 30,
                        gamma = 0.15,
                        verbose = TRUE)

# Build and train  Network
nn.fit<- dnn(Sepal.Length~., data = datasets::iris, lr_scheduler = scheduler)

}


[Package cito version 1.0.0 Index]