-
Notifications
You must be signed in to change notification settings - Fork 15
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
get_small_model.py出现维度不匹配 #8
Comments
我的也是,这个咋解决啊 @HandsLing |
需要对代码进行修改,统一small_model网络结构和修剪后参数的维度 |
请问您能展开说说么,我也遇到了这样的问题 |
请问你们解决了这个问题嘛,我也遇到了这个问题不知道怎么解决 |
各位大佬,如何解决的? 怎么改,来点详细说明啊。 |
大佬,这个咋解决啊 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
运行get_small_model.py的时候,在
File "get_small_model.py", line 242, in
small_model = get_small_model(model)
File "get_small_model.py", line 186, in get_small_model
small_model.load_state_dict(small_state_dict)
File "/home/ctgai/anaconda3/envs/taco/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1052, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for Small_Model:
size mismatch for neck_self.conv1.conv.weight: copying a param with shape torch.Size([512, 716, 1, 1]) from checkpoint, the shape in current model is torch.Size([358, 716, 1, 1]).
size mismatch for neck_self.conv1.bn.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([358]).
size mismatch for neck_self.conv1.bn.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([358]).
size mismatch for neck_self.conv1.bn.running_mean: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([358]).
加载的模型是用的train_prune_sfp.py训练得到的模型,请问这是哪里的问题呢?
The text was updated successfully, but these errors were encountered: