Skip to content

Instantly share code, notes, and snippets.

@udithhaputhanthri
Last active May 16, 2020 03:34
Show Gist options
  • Save udithhaputhanthri/7bfa334a0f5ab749b974cf92d9a9ea81 to your computer and use it in GitHub Desktop.
Save udithhaputhanthri/7bfa334a0f5ab749b974cf92d9a9ea81 to your computer and use it in GitHub Desktop.
Introduction to DCGAN using PyTorch
D=Discriminator(img_channels,hidden_D).to(device)
G=Generator(noise_channels,img_channels,hidden_G).to(device)
criterion=nn.BCELoss()
opt_D=torch.optim.Adam(D.parameters(),lr=lr, betas=(0.5,0.999))
opt_G=torch.optim.Adam(G.parameters(),lr=lr, betas=(0.5,0.999))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment