From e181622756ed1476c1a6edaedde7db55de1c1f5c Mon Sep 17 00:00:00 2001 From: smilelite Date: Wed, 13 Jul 2022 22:33:11 +0800 Subject: [PATCH] modified rb head and infer_benchmark --- ppocr/modeling/heads/rec_robustscanner_head.py | 3 --- test_tipc/configs/rec_r31_robustscanner/train_infer_python.txt | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ppocr/modeling/heads/rec_robustscanner_head.py b/ppocr/modeling/heads/rec_robustscanner_head.py index b9f8962d..7956059e 100644 --- a/ppocr/modeling/heads/rec_robustscanner_head.py +++ b/ppocr/modeling/heads/rec_robustscanner_head.py @@ -465,9 +465,6 @@ class PositionAttentionDecoder(BaseDecoder): _, c_feat, _, _ = feat.shape assert c_feat == self.dim_input - # the _get_position_index is not ok for export_model - # position_index = self._get_position_index(self.max_seq_len, n) - position_out_enc = self.position_aware_module(out_enc) query = self.embedding(position_index) diff --git a/test_tipc/configs/rec_r31_robustscanner/train_infer_python.txt b/test_tipc/configs/rec_r31_robustscanner/train_infer_python.txt index 2f58d8f3..07498c9e 100644 --- a/test_tipc/configs/rec_r31_robustscanner/train_infer_python.txt +++ b/test_tipc/configs/rec_r31_robustscanner/train_infer_python.txt @@ -49,4 +49,6 @@ inference:tools/infer/predict_rec.py --rec_char_dict_path=./ppocr/utils/dict90.t --save_log_path:./test/output/ --benchmark:True null:null +===========================infer_benchmark_params========================== +random_infer_input:[{float32,[3,48,160]}] -- GitLab