| dataset_mnist | R Documentation |
Dataset of 60,000 28x28 grayscale images of the 10 digits, along with a test set of 10,000 images.
dataset_mnist(path = "mnist.npz", convert = TRUE)
path |
Path where to cache the dataset locally (relative to ~/.keras/datasets). |
convert |
When |
Lists of training and test data: train$x, train$y, test$x, test$y, where
x is an array of grayscale image data with shape (num_samples, 28, 28) and y
is an array of digit labels (integers in range 0-9) with shape (num_samples).
str(dataset_mnist())
## List of 2 ## $ train:List of 2 ## ..$ x: int [1:60000, 1:28, 1:28] 0 0 0 0 0 0 0 0 0 0 ... ## ..$ y: int [1:60000(1d)] 5 0 4 1 9 2 1 3 1 4 ... ## $ test :List of 2 ## ..$ x: int [1:10000, 1:28, 1:28] 0 0 0 0 0 0 0 0 0 0 ... ## ..$ y: int [1:10000(1d)] 7 2 1 0 4 1 4 9 5 9 ...
str(dataset_mnist(convert = FALSE))
## List of 2 ## $ train:List of 2 ## ..$ x: <numpy.ndarray shape(60000,28,28), dtype=uint8> ## ..$ y: <numpy.ndarray shape(60000), dtype=uint8> ## $ test :List of 2 ## ..$ x: <numpy.ndarray shape(10000,28,28), dtype=uint8> ## ..$ y: <numpy.ndarray shape(10000), dtype=uint8>
Other datasets:
dataset_boston_housing()
dataset_california_housing()
dataset_cifar10()
dataset_cifar100()
dataset_fashion_mnist()
dataset_imdb()
dataset_reuters()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.