Code for the forget-gate only LSTM in the paper "The unreasonable effectiveness of the forget gate"
Python 3.5
Tensorflow 1.4
Install Tensorflow 1.4
Run:
pip install -r requirements.txtAdd and Copy experiments can be run with
python main.py --data add --name my_add_exp --log_every 20 --batch_size 50 --epochs 30python main.py --data copy --name my_copy_exp --log_every 20 --batch_size 50 --epochs 30View the results on Tensorboard with
Tensorboard --logdir logUse the --cell argument to set the type of cell, default is janet. E.g.,
python main.py --data copy --name my_copy_exp --log_every 20 --batch_size 50 --epochs 30 --cell lstmUse the --chrono argument to use chrono initialization for the LSTM. E.g.,
python main.py --data copy --name my_copy_exp --log_every 20 --batch_size 50 --epochs 30 --cell lstm --chronoMNIST and pMNIST experiments can be run with
python main.py --data mnist --name my_mnist_exp --layers 128,128 --wd 0.00001 --epochs 100python main.py --data pmnist --name my_pmnist_exp --wd 0.00001 --epochs 100Use the *_exp.py files to run multiple experiments. E.g.,
python other_exp.py --data pmnist --name multi_pmnist --wd 0.00001 --cell lstmThe changes to the LSTM cell are in aux_code/rnn_cells.py