chris8447 / simple-rnn

A simple Recurrent Neural Network with TensorFlow.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simples-rnn

A simple Recurrent Neural Network with TensorFlow.

The code get the dataset mnist of TensorFlow to train a Neural Network with dimensions defined by parameters.

Based in this tutorial video A modification of this code

Dependences

  • Python = 3.x
  • TensorFlow = 1.4

Run

    $ python3 rnn.py [1] [2] [3]
  1. Number of recurrences
  2. Number of epochs of train
  3. The size of batch to train

Examples

Running:

    $ python3 rnn.py 128 3 128

Expected output

    Extracting /tmp/data/train-images-idx3-ubyte.gz
    Extracting /tmp/data/train-labels-idx1-ubyte.gz
    Extracting /tmp/data/t10k-images-idx3-ubyte.gz
    Extracting /tmp/data/t10k-labels-idx1-ubyte.gz
    Epoch: 1 of 3
    Loss: 193.482811514

    Epoch: 2 of 3
    Loss: 56.1591507513

    Epoch: 3 of 3
    Loss: 38.9748192206

    Accuracy: 97.6700007915%

About

A simple Recurrent Neural Network with TensorFlow.

License:MIT License


Languages

Language:Python 100.0%