Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/machine-learning-tokyo/poetry-gan
https://github.com/machine-learning-tokyo/poetry-gan
creativity generative-adversarial-network machine-learning nlp research
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/machine-learning-tokyo/poetry-gan
- Owner: Machine-Learning-Tokyo
- License: mit
- Created: 2018-12-08T11:36:37.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-31T03:54:53.000Z (about 5 years ago)
- Last Synced: 2023-03-11T10:07:14.521Z (over 1 year ago)
- Topics: creativity, generative-adversarial-network, machine-learning, nlp, research
- Language: Jupyter Notebook
- Size: 2.46 MB
- Stars: 49
- Watchers: 5
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Creative GANs
Creative GANs is a research project on training language models to generate creative text with either a Maximum Likelihood Estimation (MLE) or GAN objective. It contains the code for running the experiments as described in the [paper](https://arxiv.org/abs/1909.09534).Some curated outputs can be found [here](https://www.ai-fragments.com/)
## Datasets
- Gutenberg Novels
- English poetry
- Song lyrics
- [Metaphors](http://metaphors.iath.virginia.edu/metaphors)## Text Generative Models with LM and GAN objective
- AWD LSTM [paper link](https://arxiv.org/pdf/1708.02182.pdf)
- Transformer XL [paper link](https://arxiv.org/pdf/1901.02860.pdf)The encoder models are from the fastai library
## Usage
- Preprocess data `python preprocess.py [gutenberg/metaphors/poems/lyrics]` and save preprocessed file
- Train language model `lang_model.py PATH FILENAME MODEL [PRETRAINED_FNAMES]`
- Train gan model `textgan.py PATH FILENAME PRETRAINED MODEL [CRIT] [PREDS] [EPOCHS]````
PATH - folder with data
FILENAME - name of preprocessed file
PRETRAINED - fastai model saved with learn.save()
PRETRAINED_FNAMES - pretrained weight file and vocab file (comma seperated)
MODEL - architecture to use {'AWD': AWD_LSTM, 'XL':TransformerXL}
CRIT - loss function: gumbel softmax/reinforce (only for gan)
PREDS - generate output from validation set
EPOCHS - number of epochs to train
```