YCG09 / chinese_ocr

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

关于训练后模型不能用问题 #244

Closed cellphonef closed 5 years ago

cellphonef commented 5 years ago

我用46*120进行训练得到的h5文件 在model加载时 报错 ValueError: Dimension 0 in both shapes must be equal, but are 768 and 960. Shapes are [768,5990] and [960,5990]. for 'Assign_159' (op: 'Assign') with input shapes: [768,5990], [960,5990].

怎么解决啊 @YCG09

fsfwl11406 commented 5 years ago

我也遇到了这个问题,请问你解决了吗,谢谢

jewelcai commented 5 years ago

训练得到的inputshape得和你predict的时候一致

cellphonef commented 5 years ago

我也遇到了这个问题,请问你解决了吗,谢谢

我resize了 训练的图片也要和之前的图片一样

cellphonef commented 5 years ago

resize到和作者一样的大小 32*280把 不resize的方法我也不会