#Professor forcing paper code
https://arxiv.org/pdf/1610.09038.pdf
- Generator and discriminator implemented
- Char-level PTB tested
- Jupyter Notebook with results
- Word-level tests
- Sequential MNIST (also mentioned in the paper)
- Publish pre-trained model
- PyTorch 0.4 (older versions will not work)
- TensorboardX for tensorboard usage (optional)
No special preprocessing is required, just create a file with tokens separated by space. In the original paper, the car-level language modelling is used, so in this case you should create a single file with content like 'h e l l o _ w o r l d !'
python train.py
Useful command-line arguments:
-cuda
for GPU-adversarial
for training both generator and discriminator (otherwisemodel.generator
will not be initialized and trained)-data_path
-vocab_path
. Vocab file is created if not provided and saved invocab.pt
file.-save_path
Path to save the model. Model is saved after each epoch and info about the model itself and its results is appended to its name.
For more parameters, consult opts.py
python sampler.py
For sampling, -checkpoint
, data_path
and vocab_path
arguments must be provided.