From 0507402a0f8522d582263c48fdde4630e235e24d Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Fri, 19 Feb 2021 16:29:54 +0800 Subject: [PATCH] fix export bug --- ppocr/modeling/heads/rec_att_head.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ppocr/modeling/heads/rec_att_head.py b/ppocr/modeling/heads/rec_att_head.py index 59e26c1e..0d222714 100644 --- a/ppocr/modeling/heads/rec_att_head.py +++ b/ppocr/modeling/heads/rec_att_head.py @@ -57,6 +57,9 @@ class AttentionHead(nn.Layer): else: targets = paddle.zeros(shape=[batch_size], dtype="int32") probs = None + char_onehots = None + outputs = None + alpha = None for i in range(num_steps): char_onehots = self._char_to_onehot( @@ -146,9 +149,6 @@ class AttentionLSTM(nn.Layer): else: targets = paddle.zeros(shape=[batch_size], dtype="int32") probs = None - char_onehots = None - outputs = None - alpha = None for i in range(num_steps): char_onehots = self._char_to_onehot( -- GitLab