mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2025-12-12 15:26:58 +00:00
fix attn encode
This commit is contained in:
parent
895d44bc39
commit
4b845ca159
@ -215,7 +215,7 @@ class AttnLabelEncode(BaseRecLabelEncode):
|
||||
return None
|
||||
data['length'] = np.array(len(text))
|
||||
text = [0] + text + [len(self.character) - 1] + [0] * (self.max_text_len
|
||||
- len(text) - 1)
|
||||
- len(text) - 2)
|
||||
data['label'] = np.array(text)
|
||||
return data
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user