Skip to content

Instantly share code, notes, and snippets.

@LMescheder
Last active December 7, 2017 20:23
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save LMescheder/b4d57e094cc8522497fdb5cf8fb44676 to your computer and use it in GitHub Desktop.
Save LMescheder/b4d57e094cc8522497fdb5cf8fb44676 to your computer and use it in GitHub Desktop.
This notebook contains the code for the toy experiment in the paper The Numerics of GANs.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yogeshbalaji
Copy link

apply_vec = [
(g + reg_param * Jg, v)
for (g, Jg, v) in zip(grads, Jgrads, variables) if Jg is not None
]

Shouldn't this be (g - reg_param * Jg, v) instead. Algorithm 2 in the paper has vφ ← ∇φ(f(θ, φ) − γL(θ, φ)) as update rule, where γ>0.

@LMescheder
Copy link
Author

The paper discusses (simultaneous) gradient ascent whereas Tensorflow optimizers usually implement gradient descent. That's the reason for the different signs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment