3243317597e602fe8b869662e04dccf76cddfbd5,dcgan/main.py,,,#,162
Before Change
// train with fake
noise.data.resize_(batch_size, nz, 1, 1)
noise.data.normal_(0, 1)
fake = netG(noise)
input.data.copy_(fake.data)
label.data.fill_(fake_label)
output = netD(input)
errD_fake = criterion(output, label)
After Change
// train with fake
noise.data.resize_(batch_size, nz, 1, 1)
noise.data.normal_(0, 1)
fake = netG(noise).detach()
label.data.fill_(fake_label)
output = netD(fake)
errD_fake = criterion(output, label)
errD_fake.backward()
D_G_z1 = output.data.mean()
errD = errD_real + errD_fake
optimizerD.step()
////////////////////////////////////////////////////////
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: OpenNMT/OpenNMT-py
Commit Name: 3243317597e602fe8b869662e04dccf76cddfbd5
Time: 2017-01-27
Author: tom.sercu@gmail.com
File Name: dcgan/main.py
Class Name:
Method Name:
Project Name: leftthomas/SRGAN
Commit Name: fea94d9805d3be49f5ae55d0ab3f35f07a5c6d12
Time: 2017-11-21
Author: leftthomas@qq.com
File Name: train.py
Class Name:
Method Name: