tests/testthat/test-optim-rmsprop.R

test_that("optim_rmsprop", {
  expect_optim_works(optim_rmsprop, list(lr = 0.1))
  expect_optim_works(optim_rmsprop, list(lr = 0.1, alpha = 0.8))
  expect_optim_works(optim_rmsprop, list(lr = 0.1, momentum = 0.1))
  expect_optim_works(optim_rmsprop, list(lr = 0.1, weight_decay = 0.1))
  expect_optim_works(optim_rmsprop, list(lr = 0.1, momentum = 0.1, centered = TRUE))
  expect_state_is_updated(optim_rmsprop)
})

Try the torch package in your browser

Any scripts or data that you put into this service are public.

torch documentation built on June 7, 2023, 6:19 p.m.