def smooth_l1_loss(self, pred, label, delta=(1.0 / 9.0)):
    '\n        Args:\n            pred: pred score\n            label: label\n            delta: delta\n        Returns: loss\n        '
    assert ((pred.shape == label.shape) and (label.numel() > 0))
    assert (delta > 0)
    diff = paddle.abs((pred - label))
    loss = paddle.where((diff < delta), (((0.5 * diff) * diff) / delta), (diff - (0.5 * delta)))
    return loss
Args:
    pred: pred score
    label: label
    delta: delta
Returns: loss
def smooth_l1_loss(self, pred, label, delta=(1.0 / 9.0)):
    '\n        Args:\n            pred: pred score\n            label: label\n            delta: delta\n        Returns: loss\n        '
    assert ((pred.shape == label.shape) and (label.numel() > 0))
    assert (delta > 0)
    diff = paddle.abs((pred - label))
    loss = paddle.where((diff < delta), (((0.5 * diff) * diff) / delta), (diff - (0.5 * delta)))
    return loss