if (torch_is_installed()) {
if (FALSE) {
lmbda <- function(epoch) 0.95
scheduler <- lr_multiplicative(optimizer, lr_lambda = lmbda)
for (epoch in 1:100) {
train(...)
validate(...)
scheduler$step()
}
}
}
Run the code above in your browser using DataLab