znxlwm / pytorch-generative-model-collections

Collection of generative models in Pytorch version.
2.59k stars 546 forks source link

alpha for each example in WGAN_GP #5

Open jnjaby opened 6 years ago

jnjaby commented 6 years ago

In the WGAN_GP paper ArXiv, alpha is sampled for each example. However, it's sampled element-wise referred to WGAN_GP.

Suppose we have a tensor of the size (64, 3, 15, 15), I thought the correct way to sample is alpha = torch.rand(x_.size()[0]), which returns a (64, ) tensor.

Is there something I miss or I misunderstand the paper?

JJZHK commented 6 years ago

it should be lpha = torch.rand(x_.size()[0], 1)