Learn to classify STL10 images of everyday objects using neural network, CNN, ResNets, Regularization and Data Augmentation in PyTorch with over 90% accuracy in less than 5 minutes on a single GPU. Part of Course project of "Deep Learning with Pytorch: Zero to GANs". Explore the dataset, set up a training pipeline, experiment with different network architectures & hyperparameters. Code with required modules and classes from torch, torchvision, numpy, and matplotlib.
A.K.A. Training an image classifier from scratch to over 90% accuracy in less than 5 minutes on a single GPU
The ability to try many different neural network architectures to address a problem is what makes deep learning really powerful, especially compared to shallow learning techniques like linear regression, logistic regression etc.
In this notebook we will:
# Uncomment and run the commands below if imports fail
# !conda install numpy pandas pytorch torchvision cpuonly -c pytorch -y
# !pip install matplotlib --upgrade --quiet
Installing and Importing the required modules and classes from torch, torchvision, numpy, and matplotlib.
import os
import torch
import torchvision
import numpy as np
import matplotlib.pyplot as plt
import torch.nn as nn
import torch.nn.functional as F
from torchvision.datasets import STL10
from torchvision.transforms import ToTensor
from torchvision.utils import make_grid
from torch.utils.data.dataloader import DataLoader
from torch.utils.data import random_split
%matplotlib inline
# Project name used for jovian.commit
project_name = '06-stl10-project'