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

Issue when loading the model #5

Open
naxty opened this issue Jan 25, 2024 · 1 comment
Open

Issue when loading the model #5

naxty opened this issue Jan 25, 2024 · 1 comment

Comments

@naxty
Copy link

naxty commented Jan 25, 2024

Hi @JWFanggit ,

very nice project. I'm running into issues when testing the model with the uploaded weights. Are the links pointing to the right places? Thanks in advance! This would be very helpful

Traceback (most recent call last):
  File "/Users/user/git/insure/LOTVS-CAP/Test.py", line 120, in <module>
    test_data()
  File "/Users/user/git/insure/LOTVS-CAP/Test.py", line 108, in test_data
    model.load_state_dict(weight)
  File "/Users/user/git/insure/LOTVS-CAP/.venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 2152, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for accident:
	Missing key(s) in state_dict: "fusion.image_model.downsampling.weight", "fusion.image_model.downsampling.bias".
	Unexpected key(s) in state_dict: "text.textNet.model.embeddings.position_ids", "fusion.text_model.model.embeddings.position_ids", "fusion.image_model.upsampling.weight", "fusion.image_model.upsampling.bias".
@JWFanggit
Copy link
Owner

Hi. Here's a notation error in my code. You can change downsampling to upsampling in the code and the weights file will load properly!

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

No branches or pull requests

2 participants