Closed bfonta closed 3 years ago
The 1st case: interpolates = real + alpha(fake-real) = (1-alpha)real + alphafake The 2nd case: interpolates = fake + alpha(real-fake) = alpha real + (1-alpha)fake
The two results are equal since the variable alpha is random float number between 0 and 1.
I wish this helps.
After comparing your code and your WGAN-GP paper, there seems to be a mismatch. When you perform the gradient penalty, you do the following:
while in the paper it seems that you are describing the following (note the differences in the first two lines):
You are nevertheless still sampling from a line joining fake and real data, so it should not make much difference.