Skip to content

Instantly share code, notes, and snippets.

@SubhadityaMukherjee
Created February 13, 2020 06:44
Show Gist options
  • Save SubhadityaMukherjee/350b46851d92393087dc461681d3a026 to your computer and use it in GitHub Desktop.
Save SubhadityaMukherjee/350b46851d92393087dc461681d3a026 to your computer and use it in GitHub Desktop.
gen2
netG = Generator(ngpu).to(device)

# Handle multi-gpu if desired
if (device.type == 'cuda') and (ngpu > 1):
    netG = nn.DataParallel(netG, list(range(ngpu)))
netG.apply(weights_init)
print(netG)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment