@staticmethod
def sigmoid_cross_entropy_with_logits(input: torch.Tensor, target: torch.Tensor):
    ' PyTorch Implementation for tf.nn.sigmoid_cross_entropy_with_logits:\n            max(x, 0) - x * z + log(1 + exp(-abs(x))) in\n            https://www.tensorflow.org/api_docs/python/tf/nn/sigmoid_cross_entropy_with_logits\n\n        Args:\n            input: (B, #anchors, #classes) float tensor.\n                Predicted logits for each class\n            target: (B, #anchors, #classes) float tensor.\n                One-hot encoded classification targets\n\n        Returns:\n            loss: (B, #anchors, #classes) float tensor.\n                Sigmoid cross entropy loss without reduction\n        '
    loss = ((torch.clamp(input, min=0) - (input * target)) + torch.log1p(torch.exp((- torch.abs(input)))))
    return loss
PyTorch Implementation for tf.nn.sigmoid_cross_entropy_with_logits:
    max(x, 0) - x * z + log(1 + exp(-abs(x))) in
    https://www.tensorflow.org/api_docs/python/tf/nn/sigmoid_cross_entropy_with_logits

Args:
    input: (B, #anchors, #classes) float tensor.
        Predicted logits for each class
    target: (B, #anchors, #classes) float tensor.
        One-hot encoded classification targets

Returns:
    loss: (B, #anchors, #classes) float tensor.
        Sigmoid cross entropy loss without reduction
@staticmethod
def sigmoid_cross_entropy_with_logits(input: torch.Tensor, target: torch.Tensor):
    ' PyTorch Implementation for tf.nn.sigmoid_cross_entropy_with_logits:\n            max(x, 0) - x * z + log(1 + exp(-abs(x))) in\n            https://www.tensorflow.org/api_docs/python/tf/nn/sigmoid_cross_entropy_with_logits\n\n        Args:\n            input: (B, #anchors, #classes) float tensor.\n                Predicted logits for each class\n            target: (B, #anchors, #classes) float tensor.\n                One-hot encoded classification targets\n\n        Returns:\n            loss: (B, #anchors, #classes) float tensor.\n                Sigmoid cross entropy loss without reduction\n        '
    loss = ((torch.clamp(input, min=0) - (input * target)) + torch.log1p(torch.exp((- torch.abs(input)))))
    return loss