Skip to content

the-asir/Poetry-GAN

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poetry GAN

Comparative study of generative neural text models of creative datasets using MLE and GAN objective Models are pretrained on gutenberg novels first with language modeling objectve then finetuned to a target dataset.

Datasets

  • Gutenberg Novels
  • English poetry
  • Song lyrics
  • Metaphors

Text Generative Models with LM and GAN objective

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 - 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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 94.5%
  • Python 5.5%