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.
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
-
make
VOCAB_LENGTH
a configurable hyperparameter to allow fitting arbitrary vocab sizes -
distribution without data parallelism