Skip to content

AlbertoSinigaglia/discrete-gans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Discrete Generative Adversarial Network

This repo contains all the code necessary to train Generative Adversarial Networks (GANs) with discrete outputs.

Usually this is not possible as discrete outputs are not differentiable and thus the error is not "back-propagatable".

In order to overcome this problem 2 solutions are proposed in this repo.

Reinforcement Learning

The first solution is to use reinforcement learning to estimate the generator gradient, considering the reward the negative loss, and sampling over the generator output.

RL formula

Straight-through-estimator

The second method used is the straight-through-estimator, used in VQVAE in order to have a discrete latent space (codebook), which consist in adding a residual to the continuous output of the generator in order to make it look discrete, and since additions don't break the gradient, it can be trained as a normal GAN Alt text

Results

result.mp4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published