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, dgz, d_hid):
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.
d_hid (torch.Tensor): The embeddings generated by the discriminator.
Returns:
scalar.
"""
return self.pt_ratio * energy_based_pulling_away_term(d_hid)