cifar100
load_data
¶
Load and return the CIFAR100 dataset.
Please consider using the ciFAIR100 dataset instead. CIFAR100 contains duplicates between its train and test sets.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root_dir |
str
|
The path to store the downloaded data. When |
None
|
image_key |
str
|
The key for image. |
'x'
|
label_key |
str
|
The key for label. |
'y'
|
label_mode |
str
|
Either "fine" for 100 classes or "coarse" for 20 classes. |
'fine'
|
channels_last |
bool
|
Whether channel is last |
True
|
Returns:
Type | Description |
---|---|
Tuple[NumpyDataset, NumpyDataset]
|
(train_data, eval_data) |
Raises:
Type | Description |
---|---|
ValueError
|
If the label_mode is invalid. |