clovaai / deep-text-recognition-benchmark

Text recognition (optical character recognition) with deep learning methods, ICCV 2019
Apache License 2.0
3.77k stars 1.11k forks source link

Unable to run demo.py(demo.py runtime error size mismatch for module.Prediction.weight) #376

Open hic9507 opened 1 year ago

hic9507 commented 1 year ago

After learning, I try to test using demo.py using weights, but this error pops up and it does not run. --character of train.py and demo.py are all unified to the same character, but still not executed. please help help me

Error RuntimeError: Error(s) in loading state_dict for DataParallel: size mismatch for module.Prediction.weight: copying a param with shape torch.Size([11520, 256]) from checkpoint, the shape in current model is torch.Size([11522, 256]). size mismatch for module.Prediction.bias: copying a param with shape torch.Size([11520]) from checkpoint, the shape in current model is torch.Size([11522]).

zaghdoud2019 commented 1 year ago

Hi,are you resolove the probleme please

Benewend commented 8 months ago

You need to open the demo file in the Paramus there is the character list juste make sure it is as yours