cifar¶
CIFAR dataset.
This module will download dataset from https://dataset.bj.bcebos.com/cifar/cifar-10-python.tar.gz and https://dataset.bj.bcebos.com/cifar/cifar-100-python.tar.gz, parse train/test set into paddle reader creators.
The CIFAR-10 dataset consists of 60000 32x32 color images in 10 classes, with 6000 images per class. There are 50000 training images and 10000 test images.
The CIFAR-100 dataset is just like the CIFAR-10, except it has 100 classes containing 600 images each. There are 500 training images and 100 testing images per class.
-
paddle.dataset.cifar.
train100
()[source] CIFAR-100 training set creator.
It returns a reader creator, each sample in the reader is image pixels in [0, 1] and label in [0, 99].
- Returns
Training reader creator
- Return type
callable
-
paddle.dataset.cifar.
test100
()[source] CIFAR-100 test set creator.
It returns a reader creator, each sample in the reader is image pixels in [0, 1] and label in [0, 99].
- Returns
Test reader creator.
- Return type
callable
-
paddle.dataset.cifar.
train10
(cycle=False)[source] CIFAR-10 training set creator.
It returns a reader creator, each sample in the reader is image pixels in [0, 1] and label in [0, 9].
- Parameters
cycle (bool) – whether to cycle through the dataset
- Returns
Training reader creator
- Return type
callable
-
paddle.dataset.cifar.
test10
(cycle=False)[source] CIFAR-10 test set creator.
It returns a reader creator, each sample in the reader is image pixels in [0, 1] and label in [0, 9].
- Parameters
cycle (bool) – whether to cycle through the dataset
- Returns
Test reader creator.
- Return type
callable