Discriminator

class dhg.nn.Discriminator(*args, **kwargs)[source]

Bases: torch.nn.Module

The Discriminator for Generative Adversarial Networks (GANs).

Parameters
  • in_channels (int) – The number of input channels.

  • hid_channels (int) – The number of hidden channels.

  • out_channels (int) – The number of output channels.

  • drop_rate (float) – Dropout ratio. Defaults to 0.5.

forward(X)[source]

The forward function.

Parameters

X (torch.Tensor) – The input tensor.