CIFAR-10_data icon indicating copy to clipboard operation
CIFAR-10_data copied to clipboard

Python 2/3 compatible .npz CIFAR-10 dataset

CIFAR-10_data

Python 2/3 compatible .npz CIFAR-10 dataset

The official Python download for CIFAR-10 data uses .pickle format with a protocol that only supports Python 2.X. This is the same data compressed and saved in the .npz format. Load it from Python 2 or 3 with the following syntax

import numpy as np
with np.load('cifar-10-python.npz') as data:
    out = tuple(data[k] for k in ['x_train', 'y_train', 'x_test', 'y_test'])
x_train, y_train, x_test, y_test = out

Here is a link to the raw download (240 MB).

the data