fix encode for srn

This commit is contained in:
tink2123 2021-02-08 03:21:01 +00:00
parent 4b845ca159
commit 3d8b42dc0c
1 changed files with 1 additions and 1 deletions

View File

@ -261,7 +261,7 @@ class SRNLabelEncode(BaseRecLabelEncode):
if len(text) > self.max_text_len:
return None
data['length'] = np.array(len(text))
text = text + [char_num] * (self.max_text_len - len(text))
text = text + [char_num - 1] * (self.max_text_len - len(text))
data['label'] = np.array(text)
return data