August 2018
Intermediate to advanced
272 pages
7h 2m
English
The datasets can be downloaded from the official website mentioned previously in Python, Matlab, and binary versions. There are different ways to load and read these datasets. In practice, within our TensorFlow implementations, we load it using the Keras library (https://keras.io/), which is now a part of TensorFlow in the tf.keras module. Here, we present some example code to load the CIFAR-10 dataset, but the CIFAR-100 dataset could be loaded in much the same way:
import tensorflow as tf
from tf.keras.datasets import cifar10 (x_train, y_train), (x_test, y_test) = cifar10.load_data() print('x_train shape:',x_train.shape) print('y_train shape:',y_train.shape) print('x_test shape:',x_test.shape) print('y_test shape:',y_test.shape) ...Read now
Unlock full access