AceCoooool / DSS-pytorch

:star: PyTorch implement of Deeply Supervised Salient Object Detection with Short Connection
MIT License
173 stars 53 forks source link

RuntimeError: Error(s) in loading state_dict for ModuleList: #10

Closed ghost closed 5 years ago

ghost commented 5 years ago

Traceback (most recent call last): File "/home/cbl/PycharmProjects/DSS-pytorch-master/main.py", line 97, in main(config) File "/home/cbl/PycharmProjects/DSS-pytorch-master/main.py", line 30, in main test = Solver(None, None, test_loader, config) File "/home/cbl/PycharmProjects/DSS-pytorch-master/solver.py", line 29, in init self.build_model() File "/home/cbl/PycharmProjects/DSS-pytorch-master/solver.py", line 58, in build_model if self.config.load == '': self.net.base.load_state_dict(torch.load(self.config.vgg)) File "/home/public/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 721, in load_state_dict self.class.name, "\n\t".join(error_msgs)))

RuntimeError: Error(s) in loading state_dict for ModuleList:

Missing key(s) in state_dict: "0.weight", "0.bias", "2.weight", "2.bias", "5.weight", "5.bias", "7.weight", "7.bias", "10.weight", "10.bias", "12.weight", "12.bias", "14.weight", "14.bias", "17.weight", "17.bias", "19.weight", "19.bias", "21.weight", "21.bias", "24.weight", "24.bias", "26.weight", "26.bias", "28.weight", "28.bias". 
Unexpected key(s) in state_dict: "features.0.weight", "features.0.bias", "features.2.weight", "features.2.bias", "features.5.weight", "features.5.bias", "features.7.weight", "features.7.bias", "features.10.weight", "features.10.bias", "features.12.weight", "features.12.bias", "features.14.weight", "features.14.bias", "features.17.weight", "features.17.bias", "features.19.weight", "features.19.bias", "features.21.weight", "features.21.bias", "features.24.weight", "features.24.bias", "features.26.weight", "features.26.bias", "features.28.weight", "features.28.bias", "classifier.0.weight", "classifier.0.bias", "classifier.3.weight", "classifier.3.bias", "classifier.6.weight", "classifier.6.bias". 

could you help me ?thanks

i4yyds commented 5 years ago

I have the same problem,could you help me ?thanks