- Python 3.5 +
- Numpy
- cv2
- matplotlib
- tensorflow
In this code use two dataset:
1. MNIST for recognize english digits
2. HODA for recognize persian digits
3. Install Requirements
A module to implement the stochastic gradient descent learning algorithm for a feedforward neural network. Gradients are calculated using backpropagation. Note that I have focused on making the code simple, easily readable, and easily modifiable. It is not optimized, and omits many desirable features.
1. If you recognize english digits run python mnist_main.py
2. If you recognize persian digits run python hoda_main.py
Handwritten Digits with TensorFlow
1. If you recognize english digits run python ts_main.py
$ python3 hoda_main.py
Reading train dataset (Train 60000.cdb)...
Reading test dataset (Test 20000.cdb)...
Epoch 0 : 17882 / 20000 accuracy:89.41
Epoch 1 : 18402 / 20000 accuracy:92.01
Epoch 2 : 18584 / 20000 accuracy:92.92
...
$ python mnist_main.py
Epoch 0 : 9043 / 10000 accuracy:90.42
Epoch 1 : 9191 / 10000 accuracy:91.91
Epoch 2 : 9285 / 10000 accuracy:92.85
Epoch 3 : 9295 / 10000 accuracy:92.95
Epoch 4 : 9383 / 10000 accuracy:93.83
Epoch 5 : 9391 / 10000 accuracy:93.91
...