serkansulun/deep-music-enhancer

Get error when running Resnet DA test

Closed this issue · 1 comments

Upon running run.py with these arguments:
--load resnetda.pt --test --multifilter --n_workers 16
I get the following error:

Traceback (most recent call last):
  File "J:/Python Projects/Deep Music Enhancement/src/run.py", line 308, in <module>
    runner = Runner()
  File "J:/Python Projects/Deep Music Enhancement/src/run.py", line 68, in __init__
    self.load_model()
  File "J:/Python Projects/Deep Music Enhancement/src/run.py", line 180, in load_model
    self.gen_model.load_state_dict(checkpoint['gen_model_state_dict'])
  File "J:\Python Projects\Deep Music Enhancement\venv\lib\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 Model:
	Missing key(s) in state_dict: "down_net.0.0.weight", "down_net.0.0.bias", "down_net.1.0.weight", "down_net.1.0.bias", "down_net.2.0.weight", "down_net.2.0.bias", "down_net.3.0.weight", "down_net.3.0.bias", "bottleneck.0.weight", "bottleneck.0.bias", "bottleneck.2.weight", "bottleneck.2.bias", "up_net.0.0.weight", "up_net.0.0.bias", "up_net.1.0.weight", "up_net.1.0.bias", "up_net.2.0.weight", "up_net.2.0.bias", "up_net.3.0.weight", "up_net.3.0.bias". 
	Unexpected key(s) in state_dict: "model.0.weight", "model.0.bias", "model.1.body.0.weight", "model.1.body.0.bias", "model.1.body.2.weight", "model.1.body.2.bias", "model.2.body.0.weight", "model.2.body.0.bias", "model.2.body.2.weight", "model.2.body.2.bias", "model.3.body.0.weight", "model.3.body.0.bias", "model.3.body.2.weight", "model.3.body.2.bias", "model.4.body.0.weight", "model.4.body.0.bias", "model.4.body.2.weight", "model.4.body.2.bias", "model.5.body.0.weight", "model.5.body.0.bias", "model.5.body.2.weight", "model.5.body.2.bias", "model.6.body.0.weight", "model.6.body.0.bias", "model.6.body.2.weight", "model.6.body.2.bias", "model.7.body.0.weight", "model.7.body.0.bias", "model.7.body.2.weight", "model.7.body.2.bias", "model.8.body.0.weight", "model.8.body.0.bias", "model.8.body.2.weight", "model.8.body.2.bias", "model.9.body.0.weight", "model.9.body.0.bias", "model.9.body.2.weight", "model.9.body.2.bias", "model.10.body.0.weight", "model.10.body.0.bias", "model.10.body.2.weight", "model.10.body.2.bias", "model.11.body.0.weight", "model.11.body.0.bias", "model.11.body.2.weight", "model.11.body.2.bias", "model.12.body.0.weight", "model.12.body.0.bias", "model.12.body.2.weight", "model.12.body.2.bias", "model.13.body.0.weight", "model.13.body.0.bias", "model.13.body.2.weight", "model.13.body.2.bias", "model.14.body.0.weight", "model.14.body.0.bias", "model.14.body.2.weight", "model.14.body.2.bias", "model.15.body.0.weight", "model.15.body.0.bias", "model.15.body.2.weight", "model.15.body.2.bias", "model.16.weight", "model.16.bias". 

Can you try:

--model resnet --load resnetda.pt --test --multifilter --n_workers 16