提交 dc3bce76 编写于 作者: A andyjpaddle

update sar postprocess

上级 37cd4ed3
......@@ -19,6 +19,7 @@ Global:
max_text_length: 30
infer_mode: False
use_space_char: False
rm_symbol: True
save_res_path: ./output/rec/predicts_sar.txt
Optimizer:
......@@ -47,7 +48,6 @@ Loss:
PostProcess:
name: SARLabelDecode
rm_symbol: True
Metric:
name: RecMetric
......
......@@ -526,10 +526,10 @@ class SARLabelDecode(BaseRecLabelDecode):
character_dict_path=None,
character_type='ch',
use_space_char=False,
rm_symbol=True,
**kwargs):
super(SARLabelDecode, self).__init__(character_dict_path,
character_type, use_space_char)
self.rm_symbol = kwargs.get('rm_symbol', True)
def add_special_char(self, dict_character):
beg_end_str = "<BOS/EOS>"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册