config_lr_scheduler | R Documentation |
Helps create custom learning rate schedulers for dnn
.
config_lr_scheduler(
type = c("lambda", "multiplicative", "reduce_on_plateau", "one_cycle", "step"),
verbose = FALSE,
...
)
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. |
different learning rate scheduler need different variables, these functions will tell you which variables can be set:
lambda: lr_lambda
multiplicative: lr_multiplicative
reduce_on_plateau: lr_reduce_on_plateau
one_cycle: lr_one_cycle
step: lr_step
object of class cito_lr_scheduler to give to dnn
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.