tests/testthat/test-datasets.R

context("datasets")



# these tests take a long time to load so we skip them by default
skip <- is.na(Sys.getenv("KERAS_TEST_DATASETS", unset = NA)) &&
        is.na(Sys.getenv("KERAS_TEST_ALL", unset = NA))

test_dataset <- function(name) {
  if (skip)
    return()
  dataset_fn <- eval(parse(text = paste0("dataset_", name)))
  test_call_succeeds(name, {
    dataset_fn()
  })
}

test_dataset("cifar10")
test_dataset("cifar100")
test_dataset("imdb")
test_dataset("reuters")
test_dataset("reuters_word_index")
test_dataset("mnist")
test_dataset("boston_housing")

Try the keras package in your browser

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

keras documentation built on Aug. 21, 2021, 9:07 a.m.