Skip to content

luong1409/Lenet-CUDA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lenet 5 version CUDA

Source code of Lenet 5 model implemented by using C/C++.

Members

Name MSSV
Nguyễn Minh Lương 19120571
Phạm Trần Gia Phú 20120348
Trần Phú Nguyện 1612448

Introduction

In this final project, we will implement and optimize the forward-pass of a convolutional layer utilizing CUDA. Convolutional layers are fundamental components of convolutional neural networks (CNNs).

Our optimized CUDA implementation of the convolutional layer will specifically cater to the inference process for layers C1 and C3.

To kickstart this endeavor, the Mini-DNN-CPP (Mini-DNN) framework will serve as a foundational platform for implementing a modified version of LeNet-5.

The chosen dataset for this project is Fashion MNIST, a collection of single-channel images with dimensions of 28 x 28 pixels. The output layer comprises 10 nodes, with each node representing the likelihood of the input belonging to one of the 10 classes, such as T-shirt, dress, sneaker, boot, and others.

How to run

Run Training Process and Write down the weight of model

git clone https://[email protected]/luong1409/Lenet-CUDA.git
cd Lenet-CUDA
make clean
make setup
make train_model

Run CPU (sequential) version

git clone https://[email protected]/luong1409/Lenet-CUDA.git
cd Lenet-CUDA
make clean
make setup
make test_model_cpu

Run GPU basic version

git clone https://[email protected]/luong1409/Lenet-CUDA.git
cd Lenet-CUDA
make clean
make setup
make basic
make test_model_gpu

Run test GPU inference version Contant Memory Optimization

git clone https://[email protected]/luong1409/Lenet-CUDA.git
cd Lenet-CUDA
make clean
make setup
make constant_mem
make test_model_gpu

Run test GPU inference version Shared Memory Optimization

git clone https://[email protected]/luong1409/Lenet-CUDA.git
cd Lenet-CUDA
make clean
make setup
make shared_mem
make test_model_gpu

Run test GPU inference version Combine of Constant Memory and Shared Memory Optimization

git clone https://[email protected]/luong1409/Lenet-CUDA.git
cd Lenet-CUDA
make clean
make setup
make combine
make test_model_gpu

References

Dataset

MNIST dataset

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages