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

dimension mismatch while testing #3

Open
SeekPoint opened this issue Dec 24, 2018 · 1 comment
Open

dimension mismatch while testing #3

SeekPoint opened this issue Dec 24, 2018 · 1 comment

Comments

@SeekPoint
Copy link

-rw-rw-r-- 1 gpuws gpuws 5619697 12月 24 22:09 onto_95000.pt
-rw-rw-r-- 1 gpuws gpuws 5619697 12月 24 22:13 onto_96000.pt
-rw-rw-r-- 1 gpuws gpuws 5619697 12月 24 22:17 onto_97000.pt
-rw-rw-r-- 1 gpuws gpuws 5619697 12月 24 22:20 onto_98000.pt
-rw-rw-r-- 1 gpuws gpuws 5619697 12月 24 22:24 onto_99000.pt
(.venv) gpuws@gpuws32g:/media/gpuws/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/open_type$ python3 main.py onto -lstm_type single -enhanced_mention -data_setup joint -add_crowd -multitask -mode test -reload_model_name onto_98000 -eval_data crowd/test.json -load
Loading word embeddings from /home/gpuws/data/glove/glove.840B.300d.txt...
Done loading word embeddings!
Answer num 10331
Found 1 shards at release/crowd/test.json
Multi-task learning
Traceback (most recent call last):
File "/media/gpuws/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/open_type/.venv/lib/python3.5/site-packages/torch/nn/modules/module.py", line 514, in load_state_dict
own_state[name].copy_(param)
RuntimeError: invalid argument 2: sizes do not match at /pytorch/torch/lib/THC/THCTensorCopy.cu:31

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 277, in
_test(config)
File "main.py", line 230, in _test
load_model(args.reload_model_name, constant.EXP_ROOT, args.model_id, model)
File "main.py", line 203, in load_model
model.load_state_dict(checkpoint['state_dict'])
File "/media/gpuws/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/open_type/.venv/lib/python3.5/site-packages/torch/nn/modules/module.py", line 519, in load_state_dict
.format(name, own_state[name].size(), param.size()))
RuntimeError: While copying the parameter named decoder.linear.weight, whose dimensions in the model are torch.Size([10331, 550]) and whose dimensions in the checkpoint are torch.Size([89, 550]).
(.venv) gpuws@gpuws32g:/media/gpuws/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/open_type$
(.venv) gpuws@gpuws32g:/media/gpuws/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/open_type$

@ANILDANU
Copy link

ANILDANU commented Mar 2, 2022

did you get the solution?

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