Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong calculation of gradient penalty #3

Open
Philonoist opened this issue Jan 28, 2018 · 0 comments
Open

Wrong calculation of gradient penalty #3

Philonoist opened this issue Jan 28, 2018 · 0 comments

Comments

@Philonoist
Copy link
Contributor

alpha = tf.random_uniform(shape=input_shape, minval=0., maxval=1.)

I think there is a bug here, or at least an implementation of gradient penalty not consistent with the original paper. the alpha coefficient should be randomized per image, and not per pixel.
It should be:
alpha = tf.random_uniform(shape=[input_shape[0], 1, 1, 1], minval=0., maxval=1.)

We want to sample images along the lines connecting the real and fake images. This does something strange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant