diff --git a/python/paddle/nn/functional/loss.py b/python/paddle/nn/functional/loss.py index 6fcd60ad1135b8617fc9be94f1cbe738c230de73..da2d010c323b58d9e35cb19682eb7564e45f25a0 100755 --- a/python/paddle/nn/functional/loss.py +++ b/python/paddle/nn/functional/loss.py @@ -2019,20 +2019,3 @@ def sigmoid_focal_loss(logit, loss = paddle.sum(loss, name=name) return loss - - -if __name__ == "__main__": - input_arr = np.array([], dtype=np.float32) - input = paddle.to_tensor(np.reshape(input_arr, (0, 0)), dtype='float32') - - label = paddle.to_tensor([], dtype='float32') - - weight = paddle.to_tensor([], dtype='float32') - - result = cross_entropy( - input, - label, - weight=weight, - ignore_index=-100, - soft_label=False, - axis=-1)