Skip to content

sgmoorthy/Deepword-rnn-tensorflow

Repository files navigation

Deep Word -rnn-Tensorflow

Build Status

Multi-layer Recurrent Neural Networks (LSTM, RNN) for word-level language models in Python using TensorFlow.

LSTM Long short-term memory LSTM units (or blocks) are a building unit for layers of a recurrent neural network RNN

Mostly reused code from GIT

Tools Used

Tensorflow

Anaconda

Python2.7

Before you start ,setup Tensorflow environemnt in your system. i used CPU's installations using [Conda]

Basic Usage

To train with default parameters on the input folder, run:

python train.py

To sample from a trained model

python sample.py

To pick using beam search, use the --pick parameter. Beam search can be further customized using the --width parameter, which sets the number of beams , -n set the number of words to search with. For example:

python sample.py --pick 2 --width 4 -n 100

Tensorflow commands

source activate tensorflow
#to deactivate tensorflow
source deactivate

#to enable the tensorboard to view the neural flow 
tensorboard --logdir=~/Deepword-rnn-tensorflow/logs