Below is the code:
import torch import torchvision from torchvision import transforms, datasets
#Establishing the batch size