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

博主,test.py怎么没有了。之前用你的test.py跑出了这样的错误 #13

Open
xauat-liushipeng opened this issue Sep 26, 2020 · 1 comment

Comments

@xauat-liushipeng
Copy link

python test.py
Traceback (most recent call last):
File "test.py", line 11, in
model.load_state_dict(torch.load("model_data/Epoch50-Total_Loss0.0958-Val_Loss0.1258.pth"))
File "/home/liu/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 845, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for FasterRCNN:
size mismatch for head.cls_loc.weight: copying a param with shape torch.Size([28, 4096]) from checkpoint, the shape in current model is torch.Size([84, 4096]).
size mismatch for head.cls_loc.bias: copying a param with shape torch.Size([28]) from checkpoint, the shape in current model is torch.Size([84]).
size mismatch for head.score.weight: copying a param with shape torch.Size([7, 4096]) from checkpoint, the shape in current model is torch.Size([21, 4096]).
size mismatch for head.score.bias: copying a param with shape torch.Size([7]) from checkpoint, the shape in current model is torch.Size([21]).

@bubbliiiing
Copy link
Owner

test.py只是我用来看网络结构的,留着没啥意义,就删了

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