Commit Graph
4 Commits
Author SHA1 Message Date
Michael OliverandGitHub 2b62fb2030 Fix batchnorm axis specification for Theano
Batchnorm on correct axis for Theano
2017-05-02 22:07:52 -07:00
Michael Oliver f79f4a55c9 bug fixs for theano compatibility 2017-04-28 18:23:56 -07:00
Michael OliverandGitHub 2d56791066 Update improved_wgan.py
Correctly sets the gradient_penalty hyperparameter to match the paper…
2017-04-25 16:17:01 -07:00
MattandMichael Oliver ccc1be8857 Adds improved_wgan.py to examples (#75)
* Added improved_wgan.py to examples

Implements the improved WGAN with gradient penalty in Keras.

* Fixed PEP8 issues and one docstring mistake.

* Added a note to the discriminator to avoid BatchNormalization, as per the paper.

* Minor docstring correction to clarify description for wasserstein_loss function.

* Fixed a missing line in the generator

* Minor cleanup to make generating the label vectors a bit more elegant.

* Fixing typo in previous commit.

* Moved the model out of a main() function. Model now correctly respects
keras.backend.image_data_format

* Aaaand another PEP8 cleanup >.>

* Gradient penalty is now correctly based on the gradient w.r.t. the input averaged samples, rather than the weights of the discriminator.

* Gradient is now correctly calculated on the output of the discriminator, not the
K.mean() of the output (i.e. the loss).
2017-04-24 23:38:03 -07:00