Skip to content

machine-music/char-rnn

Repository files navigation

char-rnn

A Keras implementation of Andrej Karpathy's famous RNN blog post. These python scripts can be used to

  • Train a deep LSTM-RNN on textual data
  • Generate new data based on a seed
  • Visualize training growth

Prerequisites

This repo is built in python3. The following frameworks are used:

  • NumPy
  • TensorFlow
  • Theano
  • Keras

With the following python modules:

  • sklearn
  • matplotlib

Usage

To train a new RNN model on a text file TRAIN_FILE:

python3 rnn.py -i TRAIN_FILE -e NUM_EPOCHS

In order to resume training from previous session, include the -c option and add -w WEIGHTS_FILE containing your previous weights file.

Files

rnn.py # Module for training library
generate.py # Module for generating arbitrary text
graph_training.py # Module for graphing the training history generated by rnn.py
callback.py # Helper function to generate text as training progresses.

Authors

License

This project is licensed under the MIT License.

Acknowledgments

  • Andrej Karpathy
  • Jason Brownlee
  • Keras Tutorials

About

Char-rnn implemented in Keras/Python3

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages