删掉多余的判断
This commit is contained in:
parent
0da2cdb40c
commit
606a387354
|
@ -160,8 +160,6 @@ class CTCLabelEncode(BaseRecLabelEncode):
|
|||
text = self.encode(text)
|
||||
if text is None:
|
||||
return None
|
||||
if len(text) > self.max_text_len:
|
||||
return None
|
||||
data['length'] = np.array(len(text))
|
||||
text = text + [0] * (self.max_text_len - len(text))
|
||||
data['label'] = np.array(text)
|
||||
|
|
Loading…
Reference in New Issue