From ed728506152c257b7b4d588dd1c57eefcda84f55 Mon Sep 17 00:00:00 2001 From: XYZ <1290573099@qq.com> Date: Tue, 31 Aug 2021 10:32:09 +0800 Subject: [PATCH] Update loss.py delete main function --- python/paddle/nn/functional/loss.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/python/paddle/nn/functional/loss.py b/python/paddle/nn/functional/loss.py index 6fcd60ad11..da2d010c32 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) -- GitLab