Learn practical skills, build real-world projects, and advance your career

Exploring the CIFAR10 Dataset

we'll use the CIFAR10 dataset, which consists of 60000 32x32 px colour images in 10 classes. Here are some sample images from the dataset:

alt
import os
import torch
import torchvision
import tarfile
from torchvision.datasets.utils import download_url
from torch.utils.data import random_split
project_name='05-cifar10-cnn'

We'll download the images in PNG format from this page, using some helper functions from the torchvision and tarfile packages.

# Dowload the dataset
dataset_url = "https://s3.amazonaws.com/fast-ai-imageclas/cifar10.tgz"
download_url(dataset_url, '.')
  0%|          | 0/135107811 [00:00<?, ?it/s]