提交 4b845ca1 编写于 作者: T tink2123

fix attn encode

上级 895d44bc
...@@ -215,7 +215,7 @@ class AttnLabelEncode(BaseRecLabelEncode): ...@@ -215,7 +215,7 @@ class AttnLabelEncode(BaseRecLabelEncode):
return None return None
data['length'] = np.array(len(text)) data['length'] = np.array(len(text))
text = [0] + text + [len(self.character) - 1] + [0] * (self.max_text_len text = [0] + text + [len(self.character) - 1] + [0] * (self.max_text_len
- len(text) - 1) - len(text) - 2)
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.
先完成此消息的编辑!
想要评论请 注册