From 9c1cad6eed03dc2ca9e722404c9815f8be06f502 Mon Sep 17 00:00:00 2001 From: Topdu <784990967@qq.com> Date: Wed, 6 Jul 2022 10:24:30 +0000 Subject: [PATCH] fix windows bug of abinet --- ppocr/modeling/heads/rec_abinet_head.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppocr/modeling/heads/rec_abinet_head.py b/ppocr/modeling/heads/rec_abinet_head.py index a0f60f1b..29450288 100644 --- a/ppocr/modeling/heads/rec_abinet_head.py +++ b/ppocr/modeling/heads/rec_abinet_head.py @@ -273,7 +273,7 @@ def _get_length(logit): out = out.cast('int32') out = out.argmax(-1) out = out + 1 - out = paddle.where(abn, out, paddle.to_tensor(logit.shape[1])) + out = paddle.where(abn, out, paddle.full_like(out, logit.shape[1])) return out -- GitLab