eriklindernoren / PyTorch-GAN

PyTorch implementations of Generative Adversarial Networks.
MIT License
16.41k stars 4.07k forks source link

wgan-gp #5

Closed rainerkelz closed 6 years ago

rainerkelz commented 6 years ago

hi, i believe the implementation of wgan-gp is buggy. the interpolation in https://github.com/eriklindernoren/PyTorch-GAN/blob/8aff6caf1144501355c5cc8746b119a907edfe67/implementations/wgan_gp/wgan_gp.py#L124 uses a random number for each pixel, whereas the pseudocode in the paper says to use a random number for each example.

i believe the line should be replaced by alpha = Tensor(np.random.random(size=(real_samples.shape[0], 1, 1, 1)))

eriklindernoren commented 6 years ago

Thanks. This is fixed in d2977bc.

rainerkelz commented 6 years ago

awesome! thank you!