All Projects → hijkzzz → cuda-neural-network

hijkzzz / cuda-neural-network

Licence: other
Convolutional Neural Network with CUDA (MNIST 99.23%)

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
Cuda
1817 projects
shell
77523 projects
CMake
9771 projects
M4
1887 projects

Projects that are alternatives of or similar to cuda-neural-network

Pytorch-PCGrad
Pytorch reimplementation for "Gradient Surgery for Multi-Task Learning"
Stars: ✭ 179 (+51.69%)
Mutual labels:  mnist
digdet
A realtime digit OCR on the browser using Machine Learning
Stars: ✭ 22 (-81.36%)
Mutual labels:  mnist
PaperSynth
Handwritten text to synths!
Stars: ✭ 18 (-84.75%)
Mutual labels:  mnist
cluttered-mnist
Experiments on cluttered mnist dataset with Tensorflow.
Stars: ✭ 20 (-83.05%)
Mutual labels:  mnist
LeNet-from-Scratch
Implementation of LeNet5 without any auto-differentiate tools or deep learning frameworks. Accuracy of 98.6% is achieved on MNIST dataset.
Stars: ✭ 22 (-81.36%)
Mutual labels:  mnist
MNIST
Handwritten digit recognizer using a feed-forward neural network and the MNIST dataset of 70,000 human-labeled handwritten digits.
Stars: ✭ 28 (-76.27%)
Mutual labels:  mnist
digit recognizer
CNN digit recognizer implemented in Keras Notebook, Kaggle/MNIST (0.995).
Stars: ✭ 27 (-77.12%)
Mutual labels:  mnist
catseye
Neural network library written in C and Javascript
Stars: ✭ 29 (-75.42%)
Mutual labels:  mnist
fast-tsetlin-machine-with-mnist-demo
A fast Tsetlin Machine implementation employing bit-wise operators, with MNIST demo.
Stars: ✭ 58 (-50.85%)
Mutual labels:  mnist
image-defect-detection-based-on-CNN
TensorBasicModel
Stars: ✭ 17 (-85.59%)
Mutual labels:  mnist
DCGAN-Pytorch
A Pytorch implementation of "Deep Convolutional Generative Adversarial Networks"
Stars: ✭ 23 (-80.51%)
Mutual labels:  mnist
BP-Network
Multi-Classification on dataset of MNIST
Stars: ✭ 72 (-38.98%)
Mutual labels:  mnist
gradient-boosted-decision-tree
GBDT (Gradient Boosted Decision Tree: 勾配ブースティング) のpythonによる実装
Stars: ✭ 49 (-58.47%)
Mutual labels:  mnist
tensorflow-mnist-MLP-batch normalization-weight initializers
MNIST classification using Multi-Layer Perceptron (MLP) with 2 hidden layers. Some weight-initializers and batch-normalization are implemented.
Stars: ✭ 49 (-58.47%)
Mutual labels:  mnist
MNIST-TFLite
MNIST classifier built for TensorFlow Lite - Android, iOS and other "lite" platforms
Stars: ✭ 34 (-71.19%)
Mutual labels:  mnist
pytorch-siamese-triplet
One-Shot Learning with Triplet CNNs in Pytorch
Stars: ✭ 74 (-37.29%)
Mutual labels:  mnist
playing with vae
Comparing FC VAE / FCN VAE / PCA / UMAP on MNIST / FMNIST
Stars: ✭ 53 (-55.08%)
Mutual labels:  mnist
gan-vae-pretrained-pytorch
Pretrained GANs + VAEs + classifiers for MNIST/CIFAR in pytorch.
Stars: ✭ 134 (+13.56%)
Mutual labels:  mnist
numpy-neuralnet-exercise
Implementation of key concepts of neuralnetwork via numpy
Stars: ✭ 49 (-58.47%)
Mutual labels:  mnist
MNIST-adversarial-images
Create adversarial images to fool a MNIST classifier in TensorFlow
Stars: ✭ 13 (-88.98%)
Mutual labels:  mnist

neural-network

Convolutional Neural Network with CUDA

Layers

  • Linear
  • Conv2D
  • MaxPool2D
  • ReLU
  • Softmax
  • Sigmoid
  • NLLLoss

Optimizer

  • RMSProp

Prerequisites

  • CMake 3.8+
  • MSVC14.00/GCC6+
  • CUDA 10.x [Not compatible with CUDA 11.x]

Run

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j10
mkdir mnist_data && cd mnist_data
wget -c http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
wget -c http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz
wget -c http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz
wget -c http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz
gunzip train-images-idx3-ubyte.gz 
gunzip train-labels-idx1-ubyte.gz 
gunzip t10k-labels-idx1-ubyte.gz 
gunzip t10k-images-idx3-ubyte.gz 
cd .. && ./mnist

Performance

conv 1 32 5 relu
maxpool 2
conv 32 64 5 relu
maxpool 2
conv 64 128 3 relu
fc 4 * 128 128 relu
fc 128 10 relu
softmax

shuffle = true
batch_size = 128
learning_rate = 0.003
L2 = 0.0001
beta = 0.99
  • 1 epoch 93%
  • 10 epochs 99.12%
  • 30 epochs 99.23%
  • 10s / epoch(GTX1070)

TODO

  • Faster matmul kernel function
  • CUDA Streams

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].