YCG09 / chinese_ocr

CTPN + DenseNet + CTC based end-to-end Chinese OCR implemented using tensorflow and keras
Apache License 2.0
2.73k stars 1.08k forks source link

请问有谁碰到这个错误么Labels length is zero in batch 8[[{{node ctc/CTCLoss}}]] #368

Open Cocoalate opened 3 years ago

Cocoalate commented 3 years ago

训练时报错 tensorflow.python.framework.errors_impl.InvalidArgumentError: Labels length is zero in batch 8 [[{{node ctc/CTCLoss}}]]

发现batchsize设置很小的时候(比如说2)可以正常运行,但是batchsize设置为32,64或者更大的时候就会报这个错,图片和label都能对上,有时可以正常跑完一个epoch但是第二个epoch报这个错...卡了几天了,我的label_length都是10没有是0的情况...求大神指点