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

Classifying fruits and vegetables using CNNs

import os
import torch
import torchvision
import tarfile
import matplotlib
import matplotlib.pyplot as plt
from torchvision.datasets.utils import download_url
from torch.utils.data import random_split
from torch import nn
import torch.nn.functional as F
project_name='fruits-360-cnn'

Exploring the data

We will be using the fruits 360 dataset from kaggle containing images of 131 different fruits and vegetables.You can find it here


First let us check out the dataset