Importing Libraries

We import some libraries to help us build a neural network. While torch provides building blocks to create and train a network, torchvision provides some standard datasets, like the MNIST handwritten digits dataset, and how we can transform those datasets upon loading.

import torch # PyTorch 
from torchvision import datasets # Datasets module 
import torchvision.transforms as transforms # Image Transforms 
import matplotlib.pyplot as plt # Plotting Graphs and Images

 

Discussion

1

0