Learn practical skills, build real-world projects, and advance your career
"""
1. Downloading an image dataset from web URL
2. Understanding convolution and pooling layers
3. Creating a convolutional neural network (CNN) using PyTorch
4. Training a CNN from scratch and monitoring performance
5. Underfitting, overfitting and how to overcome them
"""
'\n1. Downloading an image dataset from web URL\n2. Understanding convolution and pooling layers\n3. Creating a convolutional neural network (CNN) using PyTorch\n4. Training a CNN from scratch and monitoring performance\n5. Underfitting, overfitting and how to overcome them\n'

Load dataset

import os
import torch
import torchvision
import tarfile
from torchvision.datasets.utils import download_url
from torch.utils.data import random_split
# Dowload the dataset
dataset_url = "https://s3.amazonaws.com/fast-ai-imageclas/cifar10.tgz"
download_url(dataset_url, '.')
Using downloaded and verified file: .\cifar10.tgz
# Extract from archive - no need if extracted once already
#with tarfile.open('./cifar10.tgz', 'r:gz') as tar:
#    tar.extractall(path='./data')