提交 dc3bce76 编写于 作者: A andyjpaddle

update sar postprocess

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