OCR 识别训练时报错

您使用的是 GitHub 上的第三方库,不便于让其它人了解细节。

应该关注报的错误:

InvalidArgumentError (see above for traceback): Not enough time for target transition sequence (required: 18, available: 17) 0You can turn this error into a warning by using the flag ignore_longer_outputs_than_inputs

意思是 LSTM 序列 outputs 长度已经超出了 inputs 长度。

很有可能是您的数据格式不对,代码:

你的 self.labels 的实际长度超出了 self.seq_len。(错误提示你是否打开开关 ignore_longer_outputs_than_inputs,让错误变成警告。)

仔细检查一下,很可能是某个数据输入的 self.labels 实际长度为 18,但是 self.seq_len 被误设为 17。


TianLin,发表于 2018-4-17 18:08:23