class_docstr: ## Discriminator Loss
  
  We want to find $w$ to maximize
  $$\mathbb{E}_{x \sim \mathbb{P}_r} [f_w(x)]- \mathbb{E}_{z \sim p(z)} [f_w(g_       heta(z))]$$,
  so we minimize,
  $$-rac{1}{m} \sum_{i=1}^m f_w ig(x^{(i)} ig) +
   rac{1}{m} \sum_{i=1}^m f_w ig( g_        heta(z^{(i)}) ig)$$
docstr: * `f_real` is $f_w(x)$
  * `f_fake` is $f_w(g_   heta(z))$
  
  This returns the a tuple with losses for $f_w(x)$ and $f_w(g_   heta(z))$,
  which are later added.
  They are kept separate for logging.
code: def forward(self, f_real: torch.Tensor, f_fake: torch.Tensor):
      """
      * `f_real` is $f_w(x)$
      * `f_fake` is $f_w(g_\theta(z))$
  
      This returns the a tuple with losses for $f_w(x)$ and $f_w(g_\theta(z))$,
      which are later added.
      They are kept separate for logging.
      """
  
      # We use ReLUs to clip the loss to keep $f \in [-1, +1]$ range.
      return F.relu(1 - f_real).mean(), F.relu(1 + f_fake).mean()
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/gan/wasserstein/__init__.py
imports: import torch.utils.data
  from torch.nn import functional
  from labml_helpers.module import Module
label_desc: Use image node_id 1 for calling the DiscriminatorLoss obj's underlying member method code with example usage: obj.forward(f_real, f_fake) and returns: F,  F