Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def forward(self, real_inputs, gen_outputs, dgz): return self.recon_weight * F.mse_loss(real_inputs, gen_outputs) +\ self.gen_weight + minimax_generator_loss(dgz, reduction=self.reduction)
def forward(self, dgz): r"""Computes the loss for the given input. Args: dgz (torch.Tensor) : Output of the Discriminator with generated data. It must have the dimensions (N, \*) where \* means any number of additional dimensions. Returns: scalar if reduction is applied else Tensor with dimensions (N, \*). """ return minimax_generator_loss(dgz, self.nonsaturating, self.reduction)