From 144ea36b7ec5d3140c174f63f2fb0c439e7b18bf Mon Sep 17 00:00:00 2001 From: WenmuZhou <572459439@qq.com> Date: Mon, 28 Mar 2022 05:05:07 +0000 Subject: [PATCH] rm view --- ppocr/losses/det_pse_loss.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ppocr/losses/det_pse_loss.py b/ppocr/losses/det_pse_loss.py index 9b8ac4b5..6b31343e 100644 --- a/ppocr/losses/det_pse_loss.py +++ b/ppocr/losses/det_pse_loss.py @@ -121,9 +121,9 @@ class PSELoss(nn.Layer): if neg_num == 0: selected_mask = training_mask - selected_mask = selected_mask.view( - 1, selected_mask.shape[0], - selected_mask.shape[1]).astype('float32') + selected_mask = selected_mask.reshape( + [1, selected_mask.shape[0], selected_mask.shape[1]]).astype( + 'float32') return selected_mask neg_score = paddle.masked_select(score, gt_text <= 0.5) -- GitLab