To be specific, changes  like the following will result in failure in training DCGAN:
output = netD(input)
errD_real = criterion(output, label)
 errD_real.backward()
D_x = output.data.mean()
# train with fake
noise.data.resize_(batch_size, nz, 1, 1)
noise.data.normal_(0, 1)
fake = netG(noise)
label.data.fill_(fake_label)
output = netD(fake.detach())
errD_fake = criterion(output, label)
errD_fake.backward()
D_G_z1 = output.data.mean()
errD = errD_real + errD_fake
errD.backward()
optimizerD.step()
Does anyone know where the issue comes from?