small character-based language model implementation in TensorFlow with tf.data and keras APIs along with a browser demo using tf.js
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
trainer
web
.gitignore
LICENSE
Pipfile
Pipfile.lock
README.md
config.yaml

README.md

char-rnn

Small character-based language model implementation in TensorFlow with tf.data and keras APIs along with a browser demo using TensorFlow.js.

The task file takes hidden state sizes as a parameter and generates a neural network with stateful GRU cells of the specified layer sizes.

Running

pipenv run python trainer/task.py \
  --train-files $DATA_DIR \
  --epochs 100 \
  --steps-per-epoch 100 \
  --layers 64 64 64 \
  --job-dir $OUTPUT_DIR \
  --export-dir $OUTPUT_DIR

Other Art

TODO

  • make VOCAB_LENGTH a configurable hyperparameter to allow fitting arbitrary vocab sizes

  • distribution without data parallelism