    def _wgan_softplus_loss(self, input, target):
        """wgan loss with soft plus. softplus is a smooth approximation to the
        ReLU function.

        In StyleGAN2, it is called:
            Logistic loss for discriminator;
            Non-saturating loss for generator.

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

        Returns:
            Tensor: wgan loss.
        """
        return F.softplus(-input).mean() if target else F.softplus(input).mean()
wgan loss with soft plus. softplus is a smooth approximation to the
ReLU function.

In StyleGAN2, it is called:
Logistic loss for discriminator;
Non-saturating loss for generator.

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

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