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

Installation

Before we begin any model training, lets first install all the necessary libraries and datasets. To perform image classification we will be needing a deep learning library, Pytorch is one such library for Python users. More about it can be found here and its official page.

Now if you wish to setup Anaconda locally on your PC or laptop so that you can manage all your deep learning libraries together, check out my blog regarding the same here.

Those of you who wish to install PyTorch via pip, you can check out all instructions at the official page link given above. You can also use your notebook online via Kaggle: an online platform for hosting noetbooks and data science competitions.

!pip install jovian --upgrade --quiet

Jovian.ML is an online platform to record and share your data science related notebook with others, you can add collaborators to your projects and then everyone can access the notebooks and make changes. Each notebook uploaded is stored as a version of the original and all collaborators can see the versions available. If you don't wish to show you notebooks, you can make them Private or Secret too!


There's more to Jovian than I can summarize in this markdown cell, so go vist and explore it yourself here.

Now, after all the installation and setup, let's start working !

First we shall import all the necessary modules and packages into our notebook.

import jovian
import torch
import torchvision
import matplotlib.pyplot as plt
import torch.nn as nn
import torch.nn.functional as F
import torchvision.transforms as T
import torchvision.models as models
from torchvision.utils import make_grid
from torch.utils.data import Dataset, DataLoader
from torch.utils.data import random_split
%matplotlib inline