diff --git a/ppocr/modeling/heads/rec_att_head.py b/ppocr/modeling/heads/rec_att_head.py index a7cfe1282141d4646bf3c410d4b0f9a3e94d28fb..0d222714ff7edebfc717daa81d48ce7424dfbd03 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(