# TRUFL: Learning to Dequantise with Truncated Flows

Majority of the files in this package are for the last experiment (Section 5.3) on PTB.
Largely modified from https://github.com/harvardnlp/compound-pcfg

Important files:
- `train.py`: training and evaluating methods are implemented here.
- `trunc_latent.py`: Language modelling and TRUFL implemented here.
- `truncated_linear_encoding.py`: modified from https://github.com/phlippe/CategoricalNF/blob/master/layers/categorical_encoding/linear_encoding.py for use with the CatNF codebase.

To run:
```
python train.py --num_epochs 100 --lr 6e-4 --z_dim 12 \
	--h_dim 1024 --prior_layers 3 --prior_made_upscale 100 \
	--word_drop 0.1 --dropout 0.1 --max_grad_norm 1 --weight_decay 1e-6
```
