Imported from https://github.com/znxlwm/pytorch-MNIST-CelebA-GAN-DCGAN