From 4a8fc9176d16602a61c85cfa09cabf2c934f34a5 Mon Sep 17 00:00:00 2001 From: light1003 Date: Fri, 5 Feb 2021 15:49:01 +0800 Subject: [PATCH] Update det_basic_loss.py to_variable has been removed in paddle 2.0,using to_tensor instead --- ppocr/losses/det_basic_loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppocr/losses/det_basic_loss.py b/ppocr/losses/det_basic_loss.py index 57b3667d..eba5526d 100644 --- a/ppocr/losses/det_basic_loss.py +++ b/ppocr/losses/det_basic_loss.py @@ -200,6 +200,6 @@ def ohem_batch(scores, gt_texts, training_masks, ohem_ratio): i, :, :], ohem_ratio)) selected_masks = np.concatenate(selected_masks, 0) - selected_masks = paddle.to_variable(selected_masks) + selected_masks = paddle.to_tensor(selected_masks) return selected_masks -- GitLab