igul222 / improved_wgan_training

Code for reproducing experiments in "Improved Training of Wasserstein GANs"
MIT License
2.35k stars 668 forks source link

Index [0] of grad tensor #74

Open ahmed-fau opened 6 years ago

ahmed-fau commented 6 years ago

Hi,

I am a little confused about taking only the zero index of gradient tensor in calculating the penalty:

gradients = tf.gradients(Discriminator(interpolates), [interpolates])[0]

Why is it not possible to take the whole grad tensor ?

Best