Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while trying running the GUI #98

Closed
DoozyDoz opened this issue Feb 9, 2022 · 2 comments
Closed

Error while trying running the GUI #98

DoozyDoz opened this issue Feb 9, 2022 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@DoozyDoz
Copy link

DoozyDoz commented Feb 9, 2022

Hello ,

I appreciate the effort and time you are putting into this project it is indeed the utility most of us need but haven't known existed.
However, I have an issue.

I have just installed all requirements and then tried running python gui.py and got the following error

Traceback (most recent call last): File "D:\Latex_OCR\LaTeX-OCR-main\LaTeX-OCR-main\gui.py", line 274, in <module> ex = App(arguments) File "D:\Latex_OCR\LaTeX-OCR-main\LaTeX-OCR-main\gui.py", line 26, in __init__ self.initModel() File "D:\Latex_OCR\LaTeX-OCR-main\LaTeX-OCR-main\gui.py", line 33, in initModel args, *objs = pix2tex.initialize(self.args) File "D:\Latex_OCR\LaTeX-OCR-main\LaTeX-OCR-main\pix2tex.py", line 55, in initialize model.load_state_dict(torch.load(args.checkpoint, map_location=args.device)) File "C:\Users\amuka\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 1482, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for Model: Missing key(s) in state_dict: "decoder.net.attn_layers.layers.0.0.0.weight", "decoder.net.attn_layers.layers.0.0.0.bias", "decoder.net.attn_layers.layers.1.0.0.weight", "decoder.net.attn_layers.layers.1.0.0.bias", "decoder.net.attn_layers.layers.2.0.0.weight", "decoder.net.attn_layers.layers.2.0.0.bias", "decoder.net.attn_layers.layers.2.1.net.3.weight", "decoder.net.attn_layers.layers.2.1.net.3.bias", "decoder.net.attn_layers.layers.3.0.0.weight", "decoder.net.attn_layers.layers.3.0.0.bias", "decoder.net.attn_layers.layers.4.0.0.weight", "decoder.net.attn_layers.layers.4.0.0.bias", "decoder.net.attn_layers.layers.5.0.0.weight", "decoder.net.attn_layers.layers.5.0.0.bias", "decoder.net.attn_layers.layers.5.1.net.3.weight", "decoder.net.attn_layers.layers.5.1.net.3.bias", "decoder.net.attn_layers.layers.6.0.0.weight", "decoder.net.attn_layers.layers.6.0.0.bias", "decoder.net.attn_layers.layers.7.0.0.weight", "decoder.net.attn_layers.layers.7.0.0.bias", "decoder.net.attn_layers.layers.8.0.0.weight", "decoder.net.attn_layers.layers.8.0.0.bias", "decoder.net.attn_layers.layers.8.1.net.3.weight", "decoder.net.attn_layers.layers.8.1.net.3.bias", "decoder.net.attn_layers.layers.9.0.0.weight", "decoder.net.attn_layers.layers.9.0.0.bias", "decoder.net.attn_layers.layers.10.0.0.weight", "decoder.net.attn_layers.layers.10.0.0.bias", "decoder.net.attn_layers.layers.11.0.0.weight", "decoder.net.attn_layers.layers.11.0.0.bias", "decoder.net.attn_layers.layers.11.1.net.3.weight", "decoder.net.attn_layers.layers.11.1.net.3.bias". Unexpected key(s) in state_dict: "decoder.net.attn_layers.layers.0.0.weight", "decoder.net.attn_layers.layers.0.0.bias", "decoder.net.attn_layers.layers.1.0.weight", "decoder.net.attn_layers.layers.1.0.bias", "decoder.net.attn_layers.layers.2.0.weight", "decoder.net.attn_layers.layers.2.0.bias", "decoder.net.attn_layers.layers.2.1.net.2.weight", "decoder.net.attn_layers.layers.2.1.net.2.bias", "decoder.net.attn_layers.layers.3.0.weight", "decoder.net.attn_layers.layers.3.0.bias", "decoder.net.attn_layers.layers.4.0.weight", "decoder.net.attn_layers.layers.4.0.bias", "decoder.net.attn_layers.layers.5.0.weight", "decoder.net.attn_layers.layers.5.0.bias", "decoder.net.attn_layers.layers.5.1.net.2.weight", "decoder.net.attn_layers.layers.5.1.net.2.bias", "decoder.net.attn_layers.layers.6.0.weight", "decoder.net.attn_layers.layers.6.0.bias", "decoder.net.attn_layers.layers.7.0.weight", "decoder.net.attn_layers.layers.7.0.bias", "decoder.net.attn_layers.layers.8.0.weight", "decoder.net.attn_layers.layers.8.0.bias", "decoder.net.attn_layers.layers.8.1.net.2.weight", "decoder.net.attn_layers.layers.8.1.net.2.bias", "decoder.net.attn_layers.layers.9.0.weight", "decoder.net.attn_layers.layers.9.0.bias", "decoder.net.attn_layers.layers.10.0.weight", "decoder.net.attn_layers.layers.10.0.bias", "decoder.net.attn_layers.layers.11.0.weight", "decoder.net.attn_layers.layers.11.0.bias", "decoder.net.attn_layers.layers.11.1.net.2.weight", "decoder.net.attn_layers.layers.11.1.net.2.bias".

Any help or comment would be highly appreciated

@lukas-blecher lukas-blecher added the duplicate This issue or pull request already exists label Feb 9, 2022
@lukas-blecher
Copy link
Owner

See #73

@DoozyDoz
Copy link
Author

DoozyDoz commented Feb 9, 2022

Wow, that did it , thanks @lukas-blecher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants