Giter VIP home page Giter VIP logo

rcaae's Introduction

Pytorch Recurrent Conditional Adversarial Autoencoder (GAN): Generate Eminem lyrics from continuous space

Based on ideas from Samuel Bowman's Generating Sentences from a Continuous Space with additional changes:

  • Discriminator instead KL-divergence
  • Decoder conditioned on text style: sample from continuous space can be decoded with style like Eminem lyrics or Plain text
  • use simple BiLSTM for Encoder without Highways/Attention

To train models was used a special dataset with text samples of two different styles: small couplets from Eminem lyrics and several small sentences from Multi30K dataset.

Sampling examples


Decoded w. style `Eminem lyrics`:
	the morning rain clouds up my window
	and i ca n't see at all
	and even if i could it 'd all be gray
	but your picture on my wall <eos>

Decoded w. style `Plain text`:
	two men are playing professional hockey .
	a man in a blue shirt is fixing a yellow and white speed train .
	a man is standing on a ladder painting bricks . <eos>

Decoded w. style `Eminem lyrics`:
	and i do n't even know you slim ,
	i 'm not a little skeptical who i hang up this
	when i 'm gone , i 'm going back on the mall
	i wanna leave the show to

Decoded w. style `Plain text`:
	two men are playing hockey , one is singing karaoke .
	a man in a blue shirt is playing a keyboard and singing into a microphone .
	a man in a black shirt is playing a trumpet . <eos>

Usage

To train model use Jupyter Notebook RCAAE.ipynb or just run

python main.py

Parameters

  • --num-epochs default: 100
  • --batch-size default: 64
  • --learning-rate default: 0.0001
  • --dropout default: 0.3
  • --hidden-size LSTM hidden size, default: 500
  • --seed default: 42
  • --embeddings-size default: 300
  • --vectors pretrained word vectors, default='fasttext.en.300d' (vectors loaded automatically by torchtext library)
  • --cuda CUDA device numer, default: 0

rcaae's People

Contributors

seliverstov avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.