Skip to content

Conversation

@xiaoyao9184
Copy link

Fix #1315

@rajesh096
Copy link

RuntimeError Traceback (most recent call last)
in <cell line: 5>()
3 # Ensure EasyOCR is up-to-date and correctly initialized
4 # Initialize the EasyOCR reader with Tamil language
----> 5 reader = easyocr.Reader(['ta'], gpu=False, download_enabled=True) # Set gpu=True if using a GPU
6
7 # Path to the image containing Tamil text

2 frames
/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict, assign)
2582
2583 if len(error_msgs) > 0:
-> 2584 raise RuntimeError(
2585 "Error(s) in loading state_dict for {}:\n\t{}".format(
2586 self.class.name, "\n\t".join(error_msgs)

RuntimeError: Error(s) in loading state_dict for Model:
size mismatch for Prediction.weight: copying a param with shape torch.Size([143, 512]) from checkpoint, the shape in current model is torch.Size([127, 512]).
size mismatch for Prediction.bias: copying a param with shape torch.Size([143]) from checkpoint, the shape in current model is torch.Size([127]).
i got this error repeatedly so can you tell how to fix this ]

@srisampath5707
Copy link

Hi, I am trying to install EasyOCR v1.7.2 with ta language and I am getting the exact same error again. Has this code fix been merged with the main branch? Or is there a patch available? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

size mismatch for Prediction.bias Error!

3 participants