From 8123688a0941be22f5c9868c882d8c40e2472321 Mon Sep 17 00:00:00 2001 From: andyjpaddle Date: Tue, 7 Sep 2021 03:38:34 +0000 Subject: [PATCH] update rec_sar_head --- ppocr/modeling/heads/rec_sar_head.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppocr/modeling/heads/rec_sar_head.py b/ppocr/modeling/heads/rec_sar_head.py index 98b00ed0..ba0aa8eb 100644 --- a/ppocr/modeling/heads/rec_sar_head.py +++ b/ppocr/modeling/heads/rec_sar_head.py @@ -151,11 +151,11 @@ class ParallelSARDecoder(BaseDecoder): **kwargs): super().__init__() - self.num_classes = num_classes + self.num_classes = out_channels self.enc_bi_rnn = enc_bi_rnn self.d_k = d_k self.start_idx = out_channels - 2 - self.padding_idx = out_channels - 1 + self.padding_idx = out_channels - 1 self.max_seq_len = max_text_length self.mask = mask self.pred_concat = pred_concat -- GitLab