A convolutional neural network implementation from scratch for image classification using PyTorch.
This project implements a CNN model for classifying images from the MNIST/CIFAR-10 dataset. The implementation focuses on understanding the fundamentals of convolutional neural networks, including:
- Building CNN architectures with convolutional, pooling, and fully-connected layers
- Training neural networks using backpropagation and gradient descent
- Evaluating model performance on image classification tasks
-
Clone this repository:
git clone https://github.com/sahith-M/cnn-project.gitcd cnn-project -
Create and activate a conda environment:
conda create -n cnn_env python=3.9conda activate cnn_env -
Install required packages:
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidiaconda install jupyter matplotlib scikit-learn pandas -
Run the project
A simple CNN with:
- 2 convolutional layers
- 2 pooling layers
- 2 fully connected layers
- Output layer for classification
- Data preprocessing and exploration
- Model architecture design
- Training implementation
- Evaluation and visualization
- Fine-tuning and optimization
Based on PyTorch tutorials and CS231n course materials