From 9cc6363b0e46ba61d3de13cdfcf419ef080f35f5 Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Mon, 8 Feb 2021 14:02:31 +0800 Subject: [PATCH] fix rare export error --- ppocr/modeling/heads/rec_att_head.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ppocr/modeling/heads/rec_att_head.py b/ppocr/modeling/heads/rec_att_head.py index a7cfe128..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( -- GitLab