# Create the Discriminator netD = [Discriminator](https://docs.pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module "torch.nn.Module")(ngpu).to([device](https://docs.pytorch.org/docs/stable/tensor_attributes.html#torch.device "torch.device")) # Handle multi-GPU if desired if ([device](https://docs.pytorch.org/docs/stable/tensor_attributes.html#torch.device "torch.device").type == 'cuda') and (ngpu > 1): netD = [nn.DataParallel](https://docs.pytorch.org/docs/stable/generated/torch.nn.DataParallel.html#torch.nn.DataParallel "torch.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](https://docs.pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.apply "torch.nn.Module.apply")(weights_init) # Print the model print(netD)