Skip to content

Commit

Permalink
Update dcgan_faces_tutorial.py
Browse files Browse the repository at this point in the history
Update labels to be floats to work around torch.full inference change.
  • Loading branch information
gchanan authored Jul 28, 2020
1 parent afede4c commit 11569e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beginner_source/dcgan_faces_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ def forward(self, input):
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
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))
Expand Down

0 comments on commit 11569e0

Please sign in to comment.