update sar postprocess

This commit is contained in:
andyjpaddle 2021-09-02 07:28:30 +00:00
parent 37cd4ed333
commit dc3bce7691
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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>"