From 576644b323a186cdc69c864e7cdddfe66e8a92d4 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Thu, 4 Nov 2021 15:58:00 +0000 Subject: [PATCH] fix attn score --- ppocr/modeling/heads/rec_att_head.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppocr/modeling/heads/rec_att_head.py b/ppocr/modeling/heads/rec_att_head.py index 4286d769..6d77e42e 100644 --- a/ppocr/modeling/heads/rec_att_head.py +++ b/ppocr/modeling/heads/rec_att_head.py @@ -75,7 +75,7 @@ class AttentionHead(nn.Layer): probs_step, axis=1)], axis=1) next_input = probs_step.argmax(axis=1) targets = next_input - + probs = paddle.nn.functional.softmax(probs, axis=2) return probs -- GitLab