(output_fake)
return -F.log(output_fake + 1e-8).mean()
r"""
    Non-saturating loss for generator.

    Args:
        output_fake (Tensor): Discriminator output logits for fake images.

    Returns:
        Tensor: A scalar tensor loss output.
r"""
    Non-saturating loss for generator.
r Non - saturating loss for generator .
def ns_loss_gen(output_fake):
    r"""
    Non-saturating loss for generator.

    Args:
        output_fake (Tensor): Discriminator output logits for fake images.

    Returns:
        Tensor: A scalar tensor loss output.
    """
    output_fake = F.sigmoid(output_fake)

    return -F.log(output_fake + 1e-8).mean()
def ns_loss_gen ( output_fake ) : output_fake = F . sigmoid ( output_fake ) return - F . log ( output_fake + 1e-8 ) . mean ( )