cifar10_dataset | R Documentation |
The CIFAR datasets are benchmark classification datasets composed of 60,000 RGB thumbnail images of size 32x32 pixels. The CIFAR10 variant contains 10 classes while CIFAR100 provides 100 classes. Images are split into 50,000 training samples and 10,000 test samples.
Downloads and prepares the CIFAR100 dataset.
cifar10_dataset(
root = tempdir(),
train = TRUE,
transform = NULL,
target_transform = NULL,
download = FALSE
)
cifar100_dataset(
root = tempdir(),
train = TRUE,
transform = NULL,
target_transform = NULL,
download = FALSE
)
root |
(string): Root directory of dataset where directory
|
train |
Logical. If TRUE, use the training set; otherwise, use the test set. Not applicable to all datasets. |
transform |
Optional. A function that takes an image and returns a transformed version (e.g., normalization, cropping). |
target_transform |
Optional. A function that transforms the label. |
download |
Logical. If TRUE, downloads the dataset to |
Downloads and prepares the CIFAR archives.
A torch::dataset object. Each item is a list with:
x
: a 32x32x3 integer array
y
: the class label
Other classification_dataset:
caltech_dataset
,
eurosat_dataset()
,
fer_dataset()
,
fgvc_aircraft_dataset()
,
flowers102_dataset()
,
mnist_dataset()
,
oxfordiiitpet_dataset()
,
tiny_imagenet_dataset()
## Not run:
ds <- cifar10_dataset(root = tempdir(), download = TRUE)
item <- ds[1]
item$x
item$y
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.