提交 e7187dac 编写于 作者: T tink2123

fix encode for srn

上级 a3afc162
...@@ -261,7 +261,7 @@ class SRNLabelEncode(BaseRecLabelEncode): ...@@ -261,7 +261,7 @@ class SRNLabelEncode(BaseRecLabelEncode):
if len(text) > self.max_text_len: if len(text) > self.max_text_len:
return None return None
data['length'] = np.array(len(text)) 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) data['label'] = np.array(text)
return data return data
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册