abdur75648 / UTRNet-High-Resolution-Urdu-Text-Recognition

UTRNet: High-Resolution Urdu Text Recognition In Printed Documents (ICDAR'23)
https://abdur75648.github.io/UTRNet/
Other
43 stars 11 forks source link

Error while loading the bigger model weights #5

Closed sarim-zafar closed 5 months ago

sarim-zafar commented 5 months ago

When I try to replace the small model weights used in HF demo with the larger model weights mentioned in the GitHub repo it throws the following error:

size mismatch for SequenceModeling.0.rnn.weight_ih_l0: copying a param with shape torch.Size([1024, 32]) from checkpoint, the shape in current model is torch.Size([1024, 512]).
size mismatch for SequenceModeling.0.rnn.weight_ih_l0_reverse: copying a param with shape torch.Size([1024, 32]) from checkpoint, the shape in current model is torch.Size([1024, 512]).

Do I need to modify any code to make it work?

sarim-zafar commented 5 months ago

I was impatient to create this without going through the whole codebase. The issue has been resolved: https://huggingface.co/spaces/abdur75648/UrduOCR-UTRNet/discussions/1#660859917de4b81de592ca61