igul222 / improved_wgan_training

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

interpolates in wgan-gp #54

Closed Willjay90 closed 6 years ago

Willjay90 commented 6 years ago

I'm following Algorithm 1 in the paper with MNIST dataset.

x ̃ ← G θ ( z )
xˆ ← εx + (1 − ε)x ̃

However, in the code, it shows

differences = fake_data - real_data
interpolates = real_data + (alpha*differences)
             = read_data + alpha*(fake_data - real_data) 
             = alpha * fake_data + (1-alpha) * real_data

why?

pierremac commented 6 years ago

Well, set alpha = 1 - epsilon and I guess you get the result! And as alpha is set to be sampled uniformly at random between 0 and 1, so is epsilon.