项目作者: septra

项目描述 :
Tensorflow and Python neural network implementations
高级语言: Python
项目地址: git://github.com/septra/NeuralNetwork-Implementations.git
创建时间: 2017-06-21T16:40:49Z
项目社区:https://github.com/septra/NeuralNetwork-Implementations

开源协议:

下载


NeuralNetwork-Implementations

Code containing implementations of neural networks for different learning tasks.
As of now, models have been implemented in Tensorflow using it’s core API.

Structure:

Iris:

  • iris_network.py - Pure Python/Numpy implementation of a two layer neural network. The network is a binary classifier that tries to learn features for a single target variable in the Iris dataset.
  • iris_tensorflow.py - Neural Network model built using Tensorflow. The network uses Softmax activation for multiclass prediction on the Iris dataset.

Mnist:

  • tensorflow_mnist.py - Command line interface to experiment with hyperparameters of deep learning models. The MNIST dataset of handwritten characters has been used.
  1. usage: tensorflow_mnist.py [-h] [-e EPOCHS] [-r LEARNRATE] [-l LAYERS]
  2. [-b BATCHSIZE]
  3. Deep network for classifying MNIST images.
  4. optional arguments:
  5. -h, --help show this help message and exit
  6. -e EPOCHS, --epochs EPOCHS
  7. Number of Epochs for training the network.
  8. -r LEARNRATE, --learnrate LEARNRATE
  9. Learning Rate used in training.
  10. -l LAYERS, --layers LAYERS
  11. Comma-delimited list of the number of nodes in the
  12. hidden layers.
  13. -b BATCHSIZE, --batchsize BATCHSIZE
  14. Total batch size used in training.
  15. #Example
  16. $ python3 tensorflow_mnist.py -e 100 -r 0.01 -b 256 -l "20, 10, 20"
  17. Running session with
  18. Epochs: 100
  19. Learning Rate: 0.01000
  20. Batch Size: 256
  21. Num of hidden layers (nodes): 3 [20, 10, 20]
  22. Epoch: 1 Loss: 2.2956 Validation Accuracy: 0.1124
  23. Epoch: 2 Loss: 2.3031 Validation Accuracy: 0.1126
  24. ...
  25. Epoch: 99 Loss: 0.0949 Validation Accuracy: 0.9330
  26. Epoch: 100 Loss: 0.1376 Validation Accuracy: 0.9394
  27. Testing Accuracy: 0.935