No BN only on gen

This commit is contained in:
Martin Arjovsky 2017-01-30 17:22:02 -05:00
parent 7a2ce62e0e
commit f0b9e2086d
1 changed files with 1 additions and 4 deletions

View File

@ -116,10 +116,7 @@ if opt.netG != '': # load checkpoint if needed
netG.load_state_dict(torch.load(opt.netG)) netG.load_state_dict(torch.load(opt.netG))
print(netG) print(netG)
if opt.noBN: if opt.mlp_D:
netD = dcgan.DCGAN_D_nobn(opt.imageSize, nz, nc, ndf, ngpu, n_extra_layers)
netD.apply(weights_init)
elif opt.mlp_D:
netD = mlp.MLP_D(opt.imageSize, nz, nc, ndf, ngpu) netD = mlp.MLP_D(opt.imageSize, nz, nc, ndf, ngpu)
else: else:
netD = dcgan.DCGAN_D(opt.imageSize, nz, nc, ndf, ngpu, n_extra_layers) netD = dcgan.DCGAN_D(opt.imageSize, nz, nc, ndf, ngpu, n_extra_layers)