    def _wgan_loss(self, input, target):
        """wgan loss.

        Args:
            input (Tensor): Input tensor.
            target (bool): Target label.

        Returns:
            Tensor: wgan loss.
        """
        return -input.mean() if target else input.mean()
wgan loss.

Args:
input (Tensor): Input tensor.
target (bool): Target label.

Returns:
Tensor: wgan loss.
opensora/models/super_resolution/basicsr/losses/losses.py