diff --git a/ppocr/modeling/heads/rec_sar_head.py b/ppocr/modeling/heads/rec_sar_head.py index 98b00ed096538ea89f450601383c8a753a518e66..ba0aa8ebe54352c37f6aa9026d18c97396b782cb 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