From 509a33bd1fceff8665a0543743021f70b0a334a1 Mon Sep 17 00:00:00 2001 From: andyjpaddle Date: Sat, 2 Apr 2022 02:34:47 +0000 Subject: [PATCH] fix sar bug --- ppocr/modeling/heads/rec_sar_head.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppocr/modeling/heads/rec_sar_head.py b/ppocr/modeling/heads/rec_sar_head.py index a46cce7d..3b767426 100644 --- a/ppocr/modeling/heads/rec_sar_head.py +++ b/ppocr/modeling/heads/rec_sar_head.py @@ -216,7 +216,7 @@ class ParallelSARDecoder(BaseDecoder): self.pred_dropout = nn.Dropout(pred_dropout) pred_num_classes = self.num_classes - 1 if pred_concat: - fc_in_channel = decoder_rnn_out_size + d_model + d_enc + fc_in_channel = decoder_rnn_out_size + d_model + encoder_rnn_out_size else: fc_in_channel = d_model self.prediction = nn.Linear(fc_in_channel, pred_num_classes) -- GitLab