textvinf
Variational Inference for text with Normalizing Flows
Features
- Fully typed with annotations and checked with mypy, PEP561 compatible
Installation
- Create a conda environment
- Clone the repository
- Install poetry following the instructions from here
- Install using the command:
poetry install
Usage
To train download the ptblm dataset to the data folder or change the data location in config/ptblm_wae_nf.jsonnet
allennlp train -s models/ptblmwaenf --include-package textvinf config/ptblm_wae_nf.jsonnet
To generate sentences by sampling from the prior use:
textvinf generate models/ptblmwaenf/model.tar.gz --weights_file models/ptblmwaenf/model_state_epoch_47.th
License
Credits
This project was generated with wemake-python-package
. Current template version is: f15a51da88c8a650d16e8f30fd30f9ddeda1aea8. See what is updated since then.