From f0e614feae8af35275be4828114c82bf469fd59b Mon Sep 17 00:00:00 2001 From: FlyingQianMM <245467267@qq.com> Date: Wed, 25 Nov 2020 19:06:19 +0800 Subject: [PATCH] change print([.*].numpy()) to print([.*]) in example codes of sigmoid_focal_loss (#29094) * rewrite the sigmoid_focal_loss code example. test=develop * fix spelling mistake in comments of code example.test=develop * change print([.*].numpy()) to print([.*]) in example codes of sigmoid_focal_loss. test=document_fix --- python/paddle/nn/functional/loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/nn/functional/loss.py b/python/paddle/nn/functional/loss.py index c616f7bd221..cfdeb25c249 100755 --- a/python/paddle/nn/functional/loss.py +++ b/python/paddle/nn/functional/loss.py @@ -1348,7 +1348,7 @@ def sigmoid_focal_loss(logit, fg_label = paddle.greater_equal(label, one) fg_num = paddle.sum(paddle.cast(fg_label, dtype='float32')) output = paddle.nn.functional.sigmoid_focal_loss(logit, label, normalizer=fg_num) - print(output.numpy()) # [0.65782464] + print(output) # [0.65782464] """ if reduction not in ['sum', 'mean', 'none']: -- GitLab