CIFAR-10

We are using CIFAR-10 for our example this time instead of MNIST. As such, we do not have the convenience of using the already convenient MNIST loader. Let's quickly go through what it takes to load this new dataset!

We will be using the binary format for CIFAR-10, which you can download here: https://www.cs.toronto.edu/~kriz/cifar.html.

This dataset was put together by Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. It consists of 60,000 tiny images 32 pixels high by 32 pixels wide. The binary format of CIFAR-10 is laid out as follows:

<1 x label><3072 x pixel><1 x label><3072 x pixel><1 x label><3072 x pixel><1 x label><3072 x pixel><1 x label><3072 x pixel><1 x label><3072 x pixel> ...<1 x label><3072 x pixel>

It should be noted ...

Get Hands-On Deep Learning with Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.