JaidedAI / EasyOCR

Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
https://www.jaided.ai
Apache License 2.0
24.41k stars 3.16k forks source link

Release 1.7.0 breaks model loading #1032

Open ash2703 opened 1 year ago

ash2703 commented 1 year ago
RuntimeError                              Traceback (most recent call last)
[<ipython-input-5-ff2cbe33fafe>](https://localhost:8080/#) in <cell line: 6>()
      4 # reader_7 = easyocr.Reader(["en"])
      5 
----> 6 reader_4 = easyocr.Reader(["ta"])
      7 reader_5 = easyocr.Reader(["te"])
      8 reader_6 = easyocr.Reader(["kn"])

2 frames
[/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py](https://localhost:8080/#) in load_state_dict(self, state_dict, strict)
   2039 
   2040         if len(error_msgs) > 0:
-> 2041             raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
   2042                                self.__class__.__name__, "\n\t".join(error_msgs)))
   2043         return _IncompatibleKeys(missing_keys, unexpected_keys)

RuntimeError: Error(s) in loading state_dict for DataParallel:
    size mismatch for module.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 module.Prediction.bias: copying a param with shape torch.Size([143]) from checkpoint, the shape in current model is torch.Size([127]).
yashmanch7 commented 1 year ago

any updates on this?