Skip to content

This is a project where I classify images of everyday objects using a neural network built from scratch. I have used the Cifar10 dataset and PyTorch as the framework for coding this.

Notifications You must be signed in to change notification settings

adityarc19/neural-nets-from-scratch-using-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Neural nets from scratch!

This is a project where I classify images of everyday objects using a neural networks built from scratch.

Dataset: Cifar10

Framework: PyTorch

Installation

To install PyTorch via Anaconda, use the following conda command:

conda install pytorch torchvision -c pytorch

To install PyTorch via pip, use one of the following two commands, depending on your Python version:

# Python 3.x
pip3 install torch torchvision

Here, I have designed feed forward neural nets and convolutional neural nets from scratch, in order to classify objects in the CIFAR10 dataset.

The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images per class. There are 50000 training images and 10000 test images.

The dataset is divided into five training batches and one test batch, each with 10000 images. The test batch contains exactly 1000 randomly-selected images from each class. The training batches contain the remaining images in random order, but some training batches may contain more images from one class than another. Between them, the training batches contain exactly 5000 images from each class.

cifar10

Source

1. Feed Forward Neural Network

ffnn

ffnn_res

Find the complete implementation here.

2. Convolutional Neural Network

cnn

cnn_res

Clearly, validation accuracy jumped from 57% to 76%, while the validation loss came down from 174% to about 90%.

Find the complete implementation here.

We could furthermore increase the accuracy and bring down the loss by using transfer learning methods.

About

This is a project where I classify images of everyday objects using a neural network built from scratch. I have used the Cifar10 dataset and PyTorch as the framework for coding this.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published