(output, labels, **kwargs)
return loss.mean()
r"""
    Sigmoid cross entropy with logits, see tensorflow
    https://www.tensorflow.org/api_docs/python/tf/nn/sigmoid_cross_entropy_with_logits
r"""
    Sigmoid cross entropy with logits, see tensorflow
    https://www.tensorflow.org/api_docs/python/tf/nn/sigmoid_cross_entropy_with_logits
r Sigmoid cross entropy with logits see tensorflow https : // www . tensorflow . org / api_docs / python / tf / nn / sigmoid_cross_entropy_with_logits
def _bce_loss_with_logits(output, labels, **kwargs):
    r"""
    Sigmoid cross entropy with logits, see tensorflow
    https://www.tensorflow.org/api_docs/python/tf/nn/sigmoid_cross_entropy_with_logits
    """
    loss = F.maximum(output, 0) - output * labels + F.log(1 + F.exp(-F.abs(output)))
    return loss.mean()
def _bce_loss_with_logits ( output , labels , * * kwargs ) : loss = F . maximum ( output , 0 ) - output * labels + F . log ( 1 + F . exp ( - F . abs ( output ) ) ) return loss . mean ( )