From 4832bb62ad4a1f4d6ea69bccba3c73b392942438 Mon Sep 17 00:00:00 2001 From: WangZhen <23097963+0x45f@users.noreply.github.com> Date: Wed, 11 Sep 2024 18:54:37 +0800 Subject: [PATCH] Fix pir dy2st train (#13853) --- ppocr/modeling/heads/table_att_head.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ppocr/modeling/heads/table_att_head.py b/ppocr/modeling/heads/table_att_head.py index 6500f969a9..40b819ebbe 100644 --- a/ppocr/modeling/heads/table_att_head.py +++ b/ppocr/modeling/heads/table_att_head.py @@ -372,8 +372,6 @@ class SLAHead(nn.Layer): ) pre_chars = paddle.zeros(shape=[batch_size], dtype="int32") max_text_length = paddle.to_tensor(self.max_text_length) - # for export - loc_step, structure_step = None, None for i in range(max_text_length + 1): hidden, structure_step, loc_step = self._decode(pre_chars, fea, hidden) pre_chars = structure_step.argmax(axis=1, dtype="int32")