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

RepNet-MDNet-VehicleReID中的模型在这个项目中不能使用? #19

Open
woshiwoyali opened this issue Jan 15, 2020 · 0 comments
Open

Comments

@woshiwoyali
Copy link

将RepNet-MDNet-VehicleReID项目中的模型下载下来,用在此项目中,出现报错。
=> device: cuda:0
=> ./car_540000.weights loaded.
=> car detection model initiated.
Traceback (most recent call last):
File "VehicleDC.py", line 385, in
DR_model = Car_DC(src_dir=args.src_dir, dst_dir=args.dst_dir)
File "VehicleDC.py", line 246, in init
model_path=local_model_path)
File "VehicleDC.py", line 121, in init
self.net.load_state_dict(torch.load(model_path))
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 839, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for Cls_Net:
Missing key(s) in state_dict: "features.0.weight", "features.1.weight", "features.1.bias", "features.1.running_mean", "features.1.running_var", "features.4.0.conv1.weight", "features.4.0.bn1.weight", "features.4.0.bn1.bias", "features.4.0.bn1.running_mean", "features.4.0.bn1.running_var", "features.4.0.conv2.weight", "features.4.0.bn2.weight", "features.4.0.bn2.bias", "features.4.0.bn2.running_mean", "features.4.0.bn2.running_var", "features.4.1.conv1.weight", "features.4.1.bn1.weight", "features.4.1.bn1.bias", "features.4.1.bn1.running_mean", "features.4.1.bn1.running_var", "features.4.1.conv2.weight", "features.4.1.bn2.weight", "features.4.1.bn2.bias", "features.4.1.bn2.running_mean", "features.4.1.bn2.running_var", "features.5.0.conv1.weight", "features.5.0.bn1.weight", "features.5.0.bn1.bias", "features.5.0.bn1.running_mean", "features.5.0.bn1.running_var", "features.5.0.conv2.weight", "features.5.0.bn2.weight", "features.5.0.bn2.bias", "features.5.0.bn2.running_mean", "features.5.0.bn2.running_var", "features.5.0.downsample.0.weight", "features.5.0.downsample.1.weight", "features.5.0.downsample.1.bias", "features.5.0.downsample.1.running_mean", "features.5.0.downsample.1.running_var", "features.5.1.conv1.weight", "features.5.1.bn1.weight", "features.5.1.bn1.bias", "features.5.1.bn1.running_mean", "features.5.1.bn1.running_var", "features.5.1.conv2.weight", "features.5.1.bn2.weight", "features.5.1.bn2.bias", "features.5.1.bn2.running_mean", "features.5.1.bn2.running_var", "features.6.0.conv1.weight", "features.6.0.bn1.weight", "features.6.0.bn1.bias", "features.6.0.bn1.running_mean", "features.6.0.bn1.running_var", "features.6.0.conv2.weight", "features.6.0.bn2.weight", "features.6.0.bn2.bias", "features.6.0.bn2.running_mean", "features.6.0.bn2.running_var", "features.6.0.downsample.0.weight", "features.6.0.downsample.1.weight", "features.6.0.downsample.1.bias", "features.6.0.downsample.1.running_mean", "features.6.0.downsample.1.running_var", "features.6.1.conv1.weight", "features.6.1.bn1.weight", "features.6.1.bn1.bias", "features.6.1.bn1.running_mean", "features.6.1.bn1.running_var", "features.6.1.conv2.weight", "features.6.1.bn2.weight", "features.6.1.bn2.bias", "features.6.1.bn2.running_mean", "features.6.1.bn2.running_var", "features.7.0.conv1.weight", "features.7.0.bn1.weight", "features.7.0.bn1.bias", "features.7.0.bn1.running_mean", "features.7.0.bn1.running_var", "features.7.0.conv2.weight", "features.7.0.bn2.weight", "features.7.0.bn2.bias", "features.7.0.bn2.running_mean", "features.7.0.bn2.running_var", "features.7.0.downsample.0.weight", "features.7.0.downsample.1.weight", "features.7.0.downsample.1.bias", "features.7.0.downsample.1.running_mean", "features.7.0.downsample.1.running_var", "features.7.1.conv1.weight", "features.7.1.bn1.weight", "features.7.1.bn1.bias", "features.7.1.bn1.running_mean", "features.7.1.bn1.running_var", "features.7.1.conv2.weight", "features.7.1.bn2.weight", "features.7.1.bn2.bias", "features.7.1.bn2.running_mean", "features.7.1.bn2.running_var", "fc.weight", "fc.bias".
Unexpected key(s) in state_dict: "conv1_1.weight", "conv1_1.bias", "conv1_3.weight", "conv1_3.bias", "conv1.0.weight", "conv1.0.bias", "conv1.2.weight", "conv1.2.bias", "conv2_1.weight", "conv2_1.bias", "conv2_3.weight", "conv2_3.bias", "conv2.0.weight", "conv2.0.bias", "conv2.2.weight", "conv2.2.bias", "conv3_1.weight", "conv3_1.bias", "conv3_3.weight", "conv3_3.bias", "conv3_5.weight", "conv3_5.bias", "conv3.0.weight", "conv3.0.bias", "conv3.2.weight", "conv3.2.bias", "conv3.4.weight", "conv3.4.bias", "conv4_1_1.weight", "conv4_1_1.bias", "conv4_1_3.weight", "conv4_1_3.bias", "conv4_1_5.weight", "conv4_1_5.bias", "conv4_1.0.weight", "conv4_1.0.bias", "conv4_1.2.weight", "conv4_1.2.bias", "conv4_1.4.weight", "conv4_1.4.bias", "conv4_2_1.weight", "conv4_2_1.bias", "conv4_2_3.weight", "conv4_2_3.bias", "conv4_2_5.weight", "conv4_2_5.bias", "conv4_2.0.weight", "conv4_2.0.bias", "conv4_2.2.weight", "conv4_2.2.bias", "conv4_2.4.weight", "conv4_2.4.bias", "conv5_1_1.weight", "conv5_1_1.bias", "conv5_1_3.weight", "conv5_1_3.bias", "conv5_1_5.weight", "conv5_1_5.bias", "conv5_1.0.weight", "conv5_1.0.bias", "conv5_1.2.weight", "conv5_1.2.bias", "conv5_1.4.weight", "conv5_1.4.bias", "conv5_2_1.weight", "conv5_2_1.bias", "conv5_2_3.weight", "conv5_2_3.bias", "conv5_2_5.weight", "conv5_2_5.bias", "conv5_2.0.weight", "conv5_2.0.bias", "conv5_2.2.weight", "conv5_2.2.bias", "conv5_2.4.weight", "conv5_2.4.bias", "FC6_1_1.weight", "FC6_1_1.bias", "FC6_1_4.weight", "FC6_1_4.bias", "FC6_1.0.weight", "FC6_1.0.bias", "FC6_1.3.weight", "FC6_1.3.bias", "FC6_2_1.weight", "FC6_2_1.bias", "FC6_2_4.weight", "FC6_2_4.bias", "FC6_2.0.weight", "FC6_2.0.bias", "FC6_2.3.weight", "FC6_2.3.bias", "FC7_1.weight", "FC7_1.bias", "FC7_2.weight", "FC7_2.bias", "FC_8.weight", "FC_8.bias", "attrib_classifier.weight", "attrib_classifier.bias", "arc_fc_br2.weight", "arc_fc_br3.weight", "shared_layers.0.0.weight", "shared_layers.0.0.bias", "shared_layers.0.2.weight", "shared_layers.0.2.bias", "shared_layers.1.0.weight", "shared_layers.1.0.bias", "shared_layers.1.2.weight", "shared_layers.1.2.bias", "shared_layers.2.0.weight", "shared_layers.2.0.bias", "shared_layers.2.2.weight", "shared_layers.2.2.bias", "shared_layers.2.4.weight", "shared_layers.2.4.bias", "branch_1_feats.0.0.0.weight", "branch_1_feats.0.0.0.bias", "branch_1_feats.0.0.2.weight", "branch_1_feats.0.0.2.bias", "branch_1_feats.0.1.0.weight", "branch_1_feats.0.1.0.bias", "branch_1_feats.0.1.2.weight", "branch_1_feats.0.1.2.bias", "branch_1_feats.0.2.0.weight", "branch_1_feats.0.2.0.bias", "branch_1_feats.0.2.2.weight", "branch_1_feats.0.2.2.bias", "branch_1_feats.0.2.4.weight", "branch_1_feats.0.2.4.bias", "branch_1_feats.1.0.weight", "branch_1_feats.1.0.bias", "branch_1_feats.1.2.weight", "branch_1_feats.1.2.bias", "branch_1_feats.1.4.weight", "branch_1_feats.1.4.bias", "branch_1_feats.2.0.weight", "branch_1_feats.2.0.bias", "branch_1_feats.2.2.weight", "branch_1_feats.2.2.bias", "branch_1_feats.2.4.weight", "branch_1_feats.2.4.bias", "branch_1_fc.0.0.weight", "branch_1_fc.0.0.bias", "branch_1_fc.0.3.weight", "branch_1_fc.0.3.bias", "branch_1_fc.1.weight", "branch_1_fc.1.bias", "branch_1.0.0.0.0.weight", "branch_1.0.0.0.0.bias", "branch_1.0.0.0.2.weight", "branch_1.0.0.0.2.bias", "branch_1.0.0.1.0.weight", "branch_1.0.0.1.0.bias", "branch_1.0.0.1.2.weight", "branch_1.0.0.1.2.bias", "branch_1.0.0.2.0.weight", "branch_1.0.0.2.0.bias", "branch_1.0.0.2.2.weight", "branch_1.0.0.2.2.bias", "branch_1.0.0.2.4.weight", "branch_1.0.0.2.4.bias", "branch_1.0.1.0.weight", "branch_1.0.1.0.bias", "branch_1.0.1.2.weight", "branch_1.0.1.2.bias", "branch_1.0.1.4.weight", "branch_1.0.1.4.bias", "branch_1.0.2.0.weight", "branch_1.0.2.0.bias", "branch_1.0.2.2.weight", "branch_1.0.2.2.bias", "branch_1.0.2.4.weight", "branch_1.0.2.4.bias", "branch_1.1.0.0.weight", "branch_1.1.0.0.bias", "branch_1.1.0.3.weight", "branch_1.1.0.3.bias", "branch_1.1.1.weight", "branch_1.1.1.bias", "branch_2_feats.0.0.0.weight", "branch_2_feats.0.0.0.bias", "branch_2_feats.0.0.2.weight", "branch_2_feats.0.0.2.bias", "branch_2_feats.0.1.0.weight", "branch_2_feats.0.1.0.bias", "branch_2_feats.0.1.2.weight", "branch_2_feats.0.1.2.bias", "branch_2_feats.0.2.0.weight", "branch_2_feats.0.2.0.bias", "branch_2_feats.0.2.2.weight", "branch_2_feats.0.2.2.bias", "branch_2_feats.0.2.4.weight", "branch_2_feats.0.2.4.bias", "branch_2_feats.1.0.weight", "branch_2_feats.1.0.bias", "branch_2_feats.1.2.weight", "branch_2_feats.1.2.bias", "branch_2_feats.1.4.weight", "branch_2_feats.1.4.bias", "branch_2_feats.2.0.weight", "branch_2_feats.2.0.bias", "branch_2_feats.2.2.weight", "branch_2_feats.2.2.bias", "branch_2_feats.2.4.weight", "branch_2_feats.2.4.bias", "branch_2_fc.0.0.weight", "branch_2_fc.0.0.bias", "branch_2_fc.0.3.weight", "branch_2_fc.0.3.bias", "branch_2_fc.1.weight", "branch_2_fc.1.bias", "branch_2.0.0.0.0.weight", "branch_2.0.0.0.0.bias", "branch_2.0.0.0.2.weight", "branch_2.0.0.0.2.bias", "branch_2.0.0.1.0.weight", "branch_2.0.0.1.0.bias", "branch_2.0.0.1.2.weight", "branch_2.0.0.1.2.bias", "branch_2.0.0.2.0.weight", "branch_2.0.0.2.0.bias", "branch_2.0.0.2.2.weight", "branch_2.0.0.2.2.bias", "branch_2.0.0.2.4.weight", "branch_2.0.0.2.4.bias", "branch_2.0.1.0.weight", "branch_2.0.1.0.bias", "branch_2.0.1.2.weight", "branch_2.0.1.2.bias", "branch_2.0.1.4.weight", "branch_2.0.1.4.bias", "branch_2.0.2.0.weight", "branch_2.0.2.0.bias", "branch_2.0.2.2.weight", "branch_2.0.2.2.bias", "branch_2.0.2.4.weight", "branch_2.0.2.4.bias", "branch_2.1.0.0.weight", "branch_2.1.0.0.bias", "branch_2.1.0.3.weight", "branch_2.1.0.3.bias", "branch_2.1.1.weight", "branch_2.1.1.bias".
请问我需要如何调整,才可以运行起来。

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

1 participant