Can this code run with multi-GPU?
I got a mistake
[2021-05-28 17:07:27,724] - [trainer.py file line:53] - INFO: load_model_path: ./model_00048.pt
Traceback (most recent call last):
File "main.py", line 43, in
t.load(model_path=args.model_path)
File "/home/10301007/TTSR_noref_3scale_knn5_rec/trainer.py", line 58, in load
self.model.load_state_dict(model_state_dict)
File "/home/10101011/anaconda3/envs/SRflow/lib/python3.7/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 DataParallel:
Unexpected key(s) in state_dict: "MainNet.SFE.conv_head.weight", "MainNet.SFE.conv_head.bias", "MainNet.SFE.RBs.0.conv1.weight", "MainNet.SFE.RBs.0.conv1.bias", "MainNet.SFE.RBs.0.conv2.weight", "MainNet.SFE.RBs.0.conv2.bias", "MainNet.SFE.RBs.1.conv1.weight", "MainNet.SFE.RBs.1.conv1.bias", "MainNet.SFE.RBs.1.conv2.weight", "MainNet.SFE.RBs.1.conv2.bias", "MainNet.SFE.RBs.2.conv1.weight", "MainNet.SFE.RBs.2.conv1.bias", "MainNet.SFE.RBs.2.conv2.weight", "MainNet.SFE.RBs.2.conv2.bias", "MainNet.SFE.RBs.3.conv1.weight", "MainNet.SFE.RBs.3.conv1.bias", "MainNet.SFE.RBs.3.conv2.weight", "MainNet.SFE.RBs.3.conv2.bias", "MainNet.SFE.RBs.4.conv1.weight", "MainNet.SFE.RBs.4.conv1.bias", "MainNet.SFE.RBs.4.conv2.weight", "MainNet.SFE.RBs.4.conv2.bias", "MainNet.SFE.RBs.5.conv1.weight", "MainNet.SFE.RBs.5.conv1.bias", "MainNet.SFE.RBs.5.conv2.weight", "MainNet.SFE.RBs.5.conv2.bias", "MainNet.SFE.RBs.6.conv1.weight", "MainNet.SFE.RBs.6.conv1.bias", "MainNet.SFE.RBs.6.conv2.weight", "MainNet.SFE.RBs.6.conv2.bias", "MainNet.SFE.RBs.7.conv1.weight", "MainNet.SFE.RBs.7.conv1.bias", "MainNet.SFE.RBs.7.conv2.weight", "MainNet.SFE.RBs.7.conv2.bias", "MainNet.SFE.RBs.8.conv1.weight", "MainNet.SFE.RBs.8.conv1.bias", "MainNet.SFE.RBs.8.conv2.weight", "MainNet.SFE.RBs.8.conv2.bias", "MainNet.SFE.RBs.9.conv1.weight", "MainNet.SFE.RBs.9.conv1.bias", "MainNet.SFE.RBs.9.conv2.weight", "MainNet.SFE.RBs.9.conv2.bias", "MainNet.SFE.RBs.10.conv1.weight", "MainNet.SFE.RBs.10.conv1.bias", "MainNet.SFE.RBs.10.conv2.weight", "MainNet.SFE.RBs.10.conv2.bias", "MainNet.SFE.RBs.11.conv1.weight", "MainNet.SFE.RBs.11.conv1.bias", "MainNet.SFE.RBs.11.conv2.weight", "MainNet.SFE.RBs.11.conv2.bias", "MainNet.SFE.RBs.12.conv1.weight", "MainNet.SFE.RBs.12.conv1.bias", "MainNet.SFE.RBs.12.conv2.weight", "MainNet.SFE.RBs.12.conv2.bias", "MainNet.SFE.RBs.13.conv1.weight", "MainNet.SFE.RBs.13.conv1.bias", "MainNet.SFE.RBs.13.conv2.weight", "MainNet.SFE.RBs.13.conv2.bias", "MainNet.SFE.RBs.14.conv1.weight", "MainNet.SFE.RBs.14.conv1.bias", "MainNet.SFE.RBs.14.conv2.weight", "MainNet.SFE.RBs.14.conv2.bias", "MainNet.SFE.RBs.15.conv1.weight", "MainNet.SFE.RBs.15.conv1.bias", "MainNet.SFE.RBs.15.conv2.weight", "MainNet.SFE.RBs.15.conv2.bias", "MainNet.SFE.conv_tail.weight", "MainNet.SFE.conv_tail.bias", "MainNet.conv11_head.weight", "MainNet.conv11_head.bias", "MainNet.conv11_mid.weight", "MainNet.conv11_mid.bias", "MainNet.RB11.0.conv1.weight", "MainNet.RB11.0.conv1.bias", "MainNet.RB11.0.conv2.weight", "MainNet.RB11.0.conv2.bias", "MainNet.RB11.1.conv1.weight", "MainNet.RB11.1.conv1.bias", "MainNet.RB11.1.conv2.weight", "MainNet.RB11.1.conv2.bias", "MainNet.RB11.2.conv1.weight", "MainNet.RB11.2.conv1.bias", "MainNet.RB11.2.conv2.weight", "MainNet.RB11.2.conv2.bias", "MainNet.RB11.3.conv1.weight", "MainNet.RB11.3.conv1.bias", "MainNet.RB11.3.conv2.weight", "MainNet.RB11.3.conv2.bias", "MainNet.RB11.4.conv1.weight", "MainNet.RB11.4.conv1.bias", "MainNet.RB11.4.conv2.weight", "MainNet.RB11.4.conv2.bias", "MainNet.RB11.5.conv1.weight", "MainNet.RB11.5.conv1.bias", "MainNet.RB11.5.conv2.weight", "MainNet.RB11.5.conv2.bias", "MainNet.RB11.6.conv1.weight", "MainNet.RB11.6.conv1.bias", "MainNet.RB11.6.conv2.weight", "MainNet.RB11.6.conv2.bias", "MainNet.RB11.7.conv1.weight", "MainNet.RB11.7.conv1.bias", "MainNet.RB11.7.conv2.weight", "MainNet.RB11.7.conv2.bias", "MainNet.RB11.8.conv1.weight", "MainNet.RB11.8.conv1.bias", "MainNet.RB11.8.conv2.weight", "MainNet.RB11.8.conv2.bias", "MainNet.RB11.9.conv1.weight", "MainNet.RB11.9.conv1.bias", "MainNet.RB11.9.conv2.weight", "MainNet.RB11.9.conv2.bias", "MainNet.RB11.10.conv1.weight", "MainNet.RB11.10.conv1.bias", "MainNet.RB11.10.conv2.weight", "MainNet.RB11.10.conv2.bias", "MainNet.RB11.11.conv1.weight", "MainNet.RB11.11.conv1.bias", "MainNet.RB11.11.conv2.weight", "MainNet.RB11.11.conv2.bias", "MainNet.RB11.12.conv1.weight", "MainNet.RB11.12.conv1.bias", "MainNet.RB11.12.conv2.weight", "MainNet.RB11.12.conv2.bias", "MainNet.RB11.13.conv1.weight", "MainNet.RB11.13.conv1.bias", "MainNet.RB11.13.conv2.weight", "MainNet.RB11.13.conv2.bias", "MainNet.RB11.14.conv1.weight", "MainNet.RB11.14.conv1.bias", "MainNet.RB11.14.conv2.weight", "MainNet.RB11.14.conv2.bias", "MainNet.RB11.15.conv1.weight", "MainNet.RB11.15.conv1.bias", "MainNet.RB11.15.conv2.weight", "MainNet.RB11.15.conv2.bias", "MainNet.conv11_tail.weight", "MainNet.conv11_tail.bias", "MainNet.conv12.weight", "MainNet.conv12.bias", "MainNet.conv22_head.weight", "MainNet.conv22_head.bias", "MainNet.conv22_mid.weight", "MainNet.conv22_mid.bias", "MainNet.ex12.conv12.weight", "MainNet.ex12.conv12.bias", "MainNet.ex12.conv21.weight", "MainNet.ex12.conv21.bias", "MainNet.ex12.conv_merge1.weight", "MainNet.ex12.conv_merge1.bias", "MainNet.ex12.conv_merge2.weight", "MainNet.ex12.conv_merge2.bias", "MainNet.RB21.0.conv1.weight", "MainNet.RB21.0.conv1.bias", "MainNet.RB21.0.conv2.weight", "MainNet.RB21.0.conv2.bias", "MainNet.RB21.1.conv1.weight", "MainNet.RB21.1.conv1.bias", "MainNet.RB21.1.conv2.weight", "MainNet.RB21.1.conv2.bias", "MainNet.RB21.2.conv1.weight", "MainNet.RB21.2.conv1.bias", "MainNet.RB21.2.conv2.weight", "MainNet.RB21.2.conv2.bias", "MainNet.RB21.3.conv1.weight", "MainNet.RB21.3.conv1.bias", "MainNet.RB21.3.conv2.weight", "MainNet.RB21.3.conv2.bias", "MainNet.RB21.4.conv1.weight", "MainNet.RB21.4.conv1.bias", "MainNet.RB21.4.conv2.weight", "MainNet.RB21.4.conv2.bias", "MainNet.RB21.5.conv1.weight", "MainNet.RB21.5.conv1.bias", "MainNet.RB21.5.conv2.weight", "MainNet.RB21.5.conv2.bias", "MainNet.RB21.6.conv1.weight", "MainNet.RB21.6.conv1.bias", "MainNet.RB21.6.conv2.weight", "MainNet.RB21.6.conv2.bias", "MainNet.RB21.7.conv1.weight", "MainNet.RB21.7.conv1.bias", "MainNet.RB21.7.conv2.weight", "MainNet.RB21.7.conv2.bias", "MainNet.RB22.0.conv1.weight", "MainNet.RB22.0.conv1.bias", "MainNet.RB22.0.conv2.weight", "MainNet.RB22.0.conv2.bias", "MainNet.RB22.1.conv1.weight", "MainNet.RB22.1.conv1.bias", "MainNet.RB22.1.conv2.weight", "MainNet.RB22.1.conv2.bias", "MainNet.RB22.2.conv1.weight", "MainNet.RB22.2.conv1.bias", "MainNet.RB22.2.conv2.weight", "MainNet.RB22.2.conv2.bias", "MainNet.RB22.3.conv1.weight", "MainNet.RB22.3.conv1.bias", "MainNet.RB22.3.conv2.weight", "MainNet.RB22.3.conv2.bias", "MainNet.RB22.4.conv1.weight", "MainNet.RB22.4.conv1.bias", "MainNet.RB22.4.conv2.weight", "MainNet.RB22.4.conv2.bias", "MainNet.RB22.5.conv1.weight", "MainNet.RB22.5.conv1.bias", "MainNet.RB22.5.conv2.weight", "MainNet.RB22.5.conv2.bias", "MainNet.RB22.6.conv1.weight", "MainNet.RB22.6.conv1.bias", "MainNet.RB22.6.conv2.weight", "MainNet.RB22.6.conv2.bias", "MainNet.RB22.7.conv1.weight", "MainNet.RB22.7.conv1.bias", "MainNet.RB22.7.conv2.weight", "MainNet.RB22.7.conv2.bias", "MainNet.conv21_tail.weight", "MainNet.conv21_tail.bias", "MainNet.conv22_tail.weight", "MainNet.conv22_tail.bias", "MainNet.conv23.weight", "MainNet.conv23.bias", "MainNet.conv33_head.weight", "MainNet.conv33_head.bias", "MainNet.conv33_mid.weight", "MainNet.conv33_mid.bias", "MainNet.ex123.conv12.weight", "MainNet.ex123.conv12.bias", "MainNet.ex123.conv13.weight", "MainNet.ex123.conv13.bias", "MainNet.ex123.conv21.weight", "MainNet.ex123.conv21.bias", "MainNet.ex123.conv23.weight", "MainNet.ex123.conv23.bias", "MainNet.ex123.conv31_1.weight", "MainNet.ex123.conv31_1.bias", "MainNet.ex123.conv31_2.weight", "MainNet.ex123.conv31_2.bias", "MainNet.ex123.conv32.weight", "MainNet.ex123.conv32.bias", "MainNet.ex123.conv_merge1.weight", "MainNet.ex123.conv_merge1.bias", "MainNet.ex123.conv_merge2.weight", "MainNet.ex123.conv_merge2.bias", "MainNet.ex123.conv_merge3.weight", "MainNet.ex123.conv_merge3.bias", "MainNet.RB31.0.conv1.weight", "MainNet.RB31.0.conv1.bias", "MainNet.RB31.0.conv2.weight", "MainNet.RB31.0.conv2.bias", "MainNet.RB31.1.conv1.weight", "MainNet.RB31.1.conv1.bias", "MainNet.RB31.1.conv2.weight", "MainNet.RB31.1.conv2.bias", "MainNet.RB31.2.conv1.weight", "MainNet.RB31.2.conv1.bias", "MainNet.RB31.2.conv2.weight", "MainNet.RB31.2.conv2.bias", "MainNet.RB31.3.conv1.weight", "MainNet.RB31.3.conv1.bias", "MainNet.RB31.3.conv2.weight", "MainNet.RB31.3.conv2.bias", "MainNet.RB32.0.conv1.weight", "MainNet.RB32.0.conv1.bias", "MainNet.RB32.0.conv2.weight", "MainNet.RB32.0.conv2.bias", "MainNet.RB32.1.conv1.weight", "MainNet.RB32.1.conv1.bias", "MainNet.RB32.1.conv2.weight", "MainNet.RB32.1.conv2.bias", "MainNet.RB32.2.conv1.weight", "MainNet.RB32.2.conv1.bias", "MainNet.RB32.2.conv2.weight", "MainNet.RB32.2.conv2.bias", "MainNet.RB32.3.conv1.weight", "MainNet.RB32.3.conv1.bias", "MainNet.RB32.3.conv2.weight", "MainNet.RB32.3.conv2.bias", "MainNet.RB33.0.conv1.weight", "MainNet.RB33.0.conv1.bias", "MainNet.RB33.0.conv2.weight", "MainNet.RB33.0.conv2.bias", "MainNet.RB33.1.conv1.weight", "MainNet.RB33.1.conv1.bias", "MainNet.RB33.1.conv2.weight", "MainNet.RB33.1.conv2.bias", "MainNet.RB33.2.conv1.weight", "MainNet.RB33.2.conv1.bias", "MainNet.RB33.2.conv2.weight", "MainNet.RB33.2.conv2.bias", "MainNet.RB33.3.conv1.weight", "MainNet.RB33.3.conv1.bias", "MainNet.RB33.3.conv2.weight", "MainNet.RB33.3.conv2.bias", "MainNet.conv31_tail.weight", "MainNet.conv31_tail.bias", "MainNet.conv32_tail.weight", "MainNet.conv32_tail.bias", "MainNet.conv33_tail.weight", "MainNet.conv33_tail.bias", "MainNet.merge_tail.conv13.weight", "MainNet.merge_tail.conv13.bias", "MainNet.merge_tail.conv23.weight", "MainNet.merge_tail.conv23.bias", "MainNet.merge_tail.conv_merge.weight", "MainNet.merge_tail.conv_merge.bias", "MainNet.merge_tail.conv_tail1.weight", "MainNet.merge_tail.conv_tail1.bias", "MainNet.merge_tail.conv_tail2.weight", "MainNet.merge_tail.conv_tail2.bias", "LTE.slice1.0.weight", "LTE.slice1.0.bias", "LTE.slice2.2.weight", "LTE.slice2.2.bias", "LTE.slice2.5.weight", "LTE.slice2.5.bias", "LTE.slice3.7.weight", "LTE.slice3.7.bias", "LTE.slice3.10.weight", "LTE.slice3.10.bias", "LTE.sub_mean.weight", "LTE.sub_mean.bias".