I’m having trouble understanding the logic in the original code. In both version 0.2 2 and 1.2 2 of PyTorch, calling .uniform_(a, b) on a tensor requires a <= b, as the error states, and the call uses a = 1.0 and b = 0.02.
This might be a mistake in the original code, but I’m not familiar with GAN initialization standards / approaches for batch norm layers. Have a look here 18 for the torchvision provided ResNet model.