update sar postprocess
This commit is contained in:
parent
37cd4ed333
commit
dc3bce7691
|
@ -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>"
|
||||
|
|
Loading…
Reference in New Issue