-
Notifications
You must be signed in to change notification settings - Fork 16
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
RuntimeError: Error(s) in loading state_dict for SSD: #3
Comments
Can you share with me the download address of opixray dataset?thanks!! |
我也想要一份数据集地址,求求了,谢谢! |
我也遇到了这个维度问题,请问您解决了么,是直接将vgg的输入改成4通道么,期待您的回复! |
I also encountered this dimension problem. Did you solve it? Did you directly change the input of vgg to 4 channels? Looking forward to your reply! |
有截图吗,我有点不太记得这个问题了
…------------------ 原始邮件 ------------------
发件人: "OPIXray-author/OPIXray" ***@***.***>;
发送时间: 2022年8月17日(星期三) 晚上6:58
***@***.***>;
***@***.******@***.***>;
主题: Re: [OPIXray-author/OPIXray] RuntimeError: Error(s) in loading state_dict for SSD: (#3)
我也遇到了这个维度问题,请问您解决了么,是直接将vgg的输入改成4通道么,期待您的回复!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
|
我尝试过将DOAM模块转到别的框架上但是没有成功,后来我直接放弃了使用这个模块,而对于这个论文我只是跑通看了效果之后没有做出改进,所以很抱歉不能回答你的问题,我太菜了,祝你早日解决问题
…------------------ 原始邮件 ------------------
发件人: "OPIXray-author/OPIXray" ***@***.***>;
发送时间: 2022年8月18日(星期四) 中午12:08
***@***.***>;
***@***.******@***.***>;
主题: Re: [OPIXray-author/OPIXray] RuntimeError: Error(s) in loading state_dict for SSD: (#3)
有截图吗,我有点不太记得这个问题了
…
------------------ 原始邮件 ------------------ 发件人: "OPIXray-author/OPIXray" @.>; 发送时间: 2022年8月17日(星期三) 晚上6:58 @.>; @.@.>; 主题: Re: [OPIXray-author/OPIXray] RuntimeError: Error(s) in loading state_dict for SSD: (#3) 我也遇到了这个维度问题,请问您解决了么,是直接将vgg的输入改成4通道么,期待您的回复! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
非常感谢您的回复,就是 forward() 中输入tensor首先经过了这个“self.edge_conv2d()”,也就是DOAM模块,输出是一个4通道的tensor,但是vgg的第一个卷积就是3通道的 “self.vgg[0] :Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))”所以出现了这个错误,我的做法是在DOAM模块的最后一层添加了一个卷积“torch.nn.Conv2d(4, 3, kernel_size=3, padding=1)”,请问您是怎么解决的呢,另外我把这个DOAM模块迁移到了yolov5上,训练速度异常的慢,请问您遇到过么,这是合理的么。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
同样感谢您的回复,最近在做安检的目标检测任务,感觉好难啊,感谢回复 |
谁不是我每天感觉自己毕不了业,天天摆烂
…------------------ 原始邮件 ------------------
发件人: "OPIXray-author/OPIXray" ***@***.***>;
发送时间: 2022年8月18日(星期四) 中午1:38
***@***.***>;
***@***.******@***.***>;
主题: Re: [OPIXray-author/OPIXray] RuntimeError: Error(s) in loading state_dict for SSD: (#3)
同样感谢您的回复,最近在做安检的目标检测任务,感觉好难啊,感谢回复
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
可以多交流,好难,祝好 |
是这个方向很难吗还是创新很难呢 |
Traceback (most recent call last):
File "test.py", line 592, in
net.load_state_dict(torch.load(args.trained_model))
File "E:\Aftab\X-Ray-Baggage-Scanning\OPIXray\env\lib\site-packages\torch\nn\modules\module.py", line 830, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for SSD:
Missing key(s) in state_dict: "_conf.0.weight", "_conf.0.bias", "_conf.1.weight", "_conf.1.bias", "_conf.2.weight", "_conf.2.bias", "_conf.3.weight", "_conf.3.bias", "_conf.4.weight", "_conf.4.bias", "_conf.5.weight", "_conf.5.bias", "edge_conv2d.weight_const_hori", "edge_conv2d.weight_hori", "edge_conv2d.gamma", "edge_conv2d.weight_const_vertical", "edge_conv2d.weight_vertical", "edge_conv2d.conv2d_1_1.conv2d_1_1.weight", "edge_conv2d.conv2d_1_1.conv2d_1_1.bias", "edge_conv2d.conv2d_1_attention.conv2d_1_attention.weight", "edge_conv2d.conv2d_1_attention.conv2d_1_attention.bias", "edge_conv2d.conv2d_2_attention.conv2d_2_attention.weight", "edge_conv2d.conv2d_2_attention.conv2d_2_attention.bias", "edge_conv2d.conv2d_3_attention.conv2d_3_attention.weight", "edge_conv2d.conv2d_3_attention.conv2d_3_attention.bias", "edge_conv2d.conv2d_4_attention.conv2d_4_attention.weight", "edge_conv2d.conv2d_4_attention.conv2d_4_attention.bias", "edge_conv2d.conv2d_5_attention.conv2d_5_attention.weight", "edge_conv2d.conv2d_5_attention.conv2d_5_attention.bias", "edge_conv2d.conv2d_1_rgb_attention.conv2d_1_rgb_attention.weight", "edge_conv2d.conv2d_1_rgb_attention.conv2d_1_rgb_attention.bias", "edge_conv2d.conv2d_2_rgb_attention.conv2d_2_rgb_attention.weight", "edge_conv2d.conv2d_2_rgb_attention.conv2d_2_rgb_attention.bias", "edge_conv2d.conv2d_3_rgb_attention.conv2d_3_rgb_attention.weight", "edge_conv2d.conv2d_3_rgb_attention.conv2d_3_rgb_attention.bias", "edge_conv2d.conv2d_4_rgb_attention.conv2d_4_rgb_attention.weight", "edge_conv2d.conv2d_4_rgb_attention.conv2d_4_rgb_attention.bias", "edge_conv2d.conv2d_5_rgb_attention.conv2d_5_rgb_attention.weight", "edge_conv2d.conv2d_5_rgb_attention.conv2d_5_rgb_attention.bias", "edge_conv2d.GatedConv2dWithActivation.conv2d.weight", "edge_conv2d.GatedConv2dWithActivation.conv2d.bias", "edge_conv2d.GatedConv2dWithActivation.mask_conv2d.weight", "edge_conv2d.GatedConv2dWithActivation.mask_conv2d.bias", "edge_conv2d.GatedConv2dWithActivation.batch_norm2d.weight", "edge_conv2d.GatedConv2dWithActivation.batch_norm2d.bias", "edge_conv2d.GatedConv2dWithActivation.batch_norm2d.running_mean", "edge_conv2d.GatedConv2dWithActivation.batch_norm2d.running_var", "edge_conv2d.conv2d_1_rgb_red_concat_5.conv2d_1_rgb_red_concat_5.weight", "edge_conv2d.conv2d_1_rgb_red_concat_5.conv2d_1_rgb_red_concat_5.bias", "edge_conv2d.conv2d_1_rgb_red_concat_10.conv2d_1_rgb_red_concat_10.weight", "edge_conv2d.conv2d_1_rgb_red_concat_10.conv2d_1_rgb_red_concat_10.bias", "edge_conv2d.conv2d_1_rgb_red_concat_15.conv2d_1_rgb_red_concat_15.weight", "edge_conv2d.conv2d_1_rgb_red_concat_15.conv2d_1_rgb_red_concat_15.bias".
Unexpected key(s) in state_dict: "conf.0.weight", "conf.0.bias", "conf.1.weight", "conf.1.bias", "conf.2.weight", "conf.2.bias", "conf.3.weight", "conf.3.bias", "conf.4.weight", "conf.4.bias", "conf.5.weight", "conf.5.bias".
size mismatch for vgg.0.weight: copying a param with shape torch.Size([64, 3, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 4, 3, 3]).
@OPIXray-author why it is showing such error while loading the SSD model?
The text was updated successfully, but these errors were encountered: