class_docstr: Calculates an adversarial loss on a Patch Discriminator or a Multi-scale Patch Discriminator.
  Warning: due to the possibility of using different criterions, the output of the discrimination
  mustn't be passed to a final activation layer. That is taken care of internally within the loss.
  
  Args:
      reduction: {``"none"``, ``"mean"``, ``"sum"``}
          Specifies the reduction to apply to the output. Defaults to ``"mean"``.
  
          - ``"none"``: no reduction will be applied.
          - ``"mean"``: the sum of the output will be divided by the number of elements in the output.
          - ``"sum"``: the output will be summed.
  
      criterion: which criterion (hinge, least_squares or bce) you want to use on the discriminators outputs.
          Depending on the criterion, a different activation layer will be used. Make sure you don't run the outputs
          through an activation layer prior to calling the loss.
      no_activation_leastsq: if True, the activation layer in the case of least-squares is removed.
code: def _forward_single(
      self, input: torch.Tensor, target: torch.Tensor
  ) -> torch.Tensor:
      forward: torch.Tensor
      if (
          self.criterion == AdversarialCriterions.BCE
          or self.criterion == AdversarialCriterions.LEAST_SQUARE
      ):
          forward = self.loss_fct(input, target)
      elif self.criterion == AdversarialCriterions.HINGE:
          minval = torch.min(input - 1, self.get_zero_tensor(input))
          forward = -torch.mean(minval)
      return forward
  
file_path: MONAI/monai/losses/adversarial_loss.py
imports: from __future__ import annotations
  import warnings
  import torch
  from torch.nn.modules.loss import _Loss
  from monai.networks.layers.utils import get_act_layer
  from monai.utils import LossReduction
  from monai.utils.enums import StrEnum
label_desc: Use image node_id 5 for calling the PatchAdversarialLoss obj's underlying member method code with example usage: obj._forward_single(input, target) and returns: forward