# Create the Discriminator netD = Discriminator(ngpu).to(device) # Handle multi-GPU if desired if (device.type == 'cuda') and (ngpu > 1): netD = nn.DataParallel(netD, list(range(ngpu))) # Apply the ``weights_init`` function to randomly initialize all weights # like this: ``to mean=0, stdev=0.2``. netD.apply(weights_init) # Print the model print(netD)