A basic C/CUDA implementation of a Feedforward Neural Network for handwritten digit classification on the MNIST dataset.
This project was originally intended to run on my old HP Pavilion laptop with an NVIDIA GeForce 840M GPU. Because the service is supose to attent never kicked off, this repository is published as a example for learning purposes.
The project implements a classic multilayer perceptron entirely from scratch using native CUDA kernels for parallel acceleration:
- Forward Propagation: Matrix-vector multiplications computed in parallel across GPU threads to calculate layer activations.
- Activation Function: Sigmoid activation applied element-wise via custom device functions.
- Backpropagation: Parallel execution of the chain rule to calculate gradients for weights and biases across all layers.
- Optimization: Stochastic Gradient Descent (SGD) to update network weights dynamically across training batches.
- NVIDIA CUDA Toolkit - v11.3
nvcccompiler