Created
November 15, 2019 04:12
-
-
Save Exoceus/c879c4410f99e71461f881a23f58eeca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialize BCELoss function | |
criterion = nn.BCELoss() | |
# Create batch of latent vectors that we will use to visualize | |
# the progression of the generator | |
fixed_noise = torch.randn(64, nz, 1, 1, device=device) | |
# Establish convention for real and fake labels during training | |
real_label = 1 | |
fake_label = 0 | |
# Setup Adam optimizers for both G and D | |
optimizerD = optim.Adam(netD.parameters(), lr=lr, betas=(beta1, 0.999)) | |
optimizerG = optim.Adam(netG.parameters(), lr=lr, betas=(beta1, 0.999)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment