You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was training with Cityscapes dataset and I trained and saved the weights with no changes to your code. But when Im loading it in eval.py it is giving the following error.
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/content/gdrive/MyDrive/SReC-master/src/eval.py", line 121, in
main()
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/content/gdrive/MyDrive/SReC-master/src/eval.py", line 95, in main compressor.nets.load_state_dict(checkpoint["nets"])
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 845, 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: "1.0.rgb_decs.0.body.3.weight", "1.0.rgb_decs.0.body.3.bias", "1.0.rgb_decs.1.body.3.weight", "1.0.rgb_decs.1.body.3.bias", "1.0.rgb_decs.2.body.3.weight", "1.0.rgb_decs.2.body.3.bias", "1.1.rgb_decs.0.body.3.weight", "1.1.rgb_decs.0.body.3.bias", "1.1.rgb_decs.1.body.3.weight", "1.1.rgb_decs.1.body.3.bias", "1.1.rgb_decs.2.body.3.weight", "1.1.rgb_decs.2.body.3.bias", "1.2.rgb_decs.0.body.3.weight", "1.2.rgb_decs.0.body.3.bias", "1.2.rgb_decs.1.body.3.weight", "1.2.rgb_decs.1.body.3.bias", "1.2.rgb_decs.2.body.3.weight", "1.2.rgb_decs.2.body.3.bias". Unexpected key(s) in state_dict: "1.0.rgb_decs.0.body.4.body.0.weight", "1.0.rgb_decs.0.body.4.body.0.bias", "1.0.rgb_decs.0.body.4.body.2.weight", "1.0.rgb_decs.0.body.4.body.2.bias", "1.0.rgb_decs.0.body.5.weight", "1.0.rgb_decs.0.body.5.bias", "1.0.rgb_decs.0.body.3.body.0.weight", "1.0.rgb_decs.0.body.3.body.0.bias", "1.0.rgb_decs.0.body.3.body.2.weight", "1.0.rgb_decs.0.body.3.body.2.bias", "1.0.rgb_decs.1.body.4.body.0.weight", "1.0.rgb_decs.1.body.4.body.0.bias", "1.0.rgb_decs.1.body.4.body.2.weight", "1.0.rgb_decs.1.body.4.body.2.bias", "1.0.rgb_decs.1.body.5.weight", "1.0.rgb_decs.1.body.5.bias", "1.0.rgb_decs.1.body.3.body.0.weight", "1.0.rgb_decs.1.body.3.body.0.bias", "1.0.rgb_decs.1.body.3.body.2.weight", "1.0.rgb_decs.1.body.3.body.2.bias", "1.0.rgb_decs.2.body.4.body.0.weight", "1.0.rgb_decs.2.body.4.body.0.bias", "1.0.rgb_decs.2.body.4.body.2.weight", "1.0.rgb_decs.2.body.4.body.2.bias", "1.0.rgb_decs.2.body.5.weight", "1.0.rgb_decs.2.body.5.bias", "1.0.rgb_decs.2.body.3.body.0.weight", "1.0.rgb_decs.2.body.3.body.0.bias", "1.0.rgb_decs.2.body.3.body.2.weight", "1.0.rgb_decs.2.body.3.body.2.bias", "1.1.rgb_decs.0.body.4.body.0.weight", "1.1.rgb_decs.0.body.4.body.0.bias", "1.1.rgb_decs.0.body.4.body.2.weight", "1.1.rgb_decs.0.body.4.body.2.bias", "1.1.rgb_decs.0.body.5.weight", "1.1.rgb_decs.0.body.5.bias", "1.1.rgb_decs.0.body.3.body.0.weight", "1.1.rgb_decs.0.body.3.body.0.bias", "1.1.rgb_decs.0.body.3.body.2.weight", "1.1.rgb_decs.0.body.3.body.2.bias", "1.1.rgb_decs.1.body.4.body.0.weight", "1.1.rgb_decs.1.body.4.body.0.bias", "1.1.rgb_decs.1.body.4.body.2.weight", "1.1.rgb_decs.1.body.4.body.2.bias", "1.1.rgb_decs.1.body.5.weight", "1.1.rgb_decs.1.body.5.bias", "1.1.rgb_decs.1.body.3.body.0.weight", "1.1.rgb_decs.1.body.3.body.0.bias", "1.1.rgb_decs.1.body.3.body.2.weight", "1.1.rgb_decs.1.body.3.body.2.bias", "1.1.rgb_decs.2.body.4.body.0.weight", "1.1.rgb_decs.2.body.4.body.0.bias", "1.1.rgb_decs.2.body.4.body.2.weight", "1.1.rgb_decs.2.body.4.body.2.bias", "1.1.rgb_decs.2.body.5.weight", "1.1.rgb_decs.2.body.5.bias", "1.1.rgb_decs.2.body.3.body.0.weight", "1.1.rgb_decs.2.body.3.body.0.bias", "1.1.rgb_decs.2.body.3.body.2.weight", "1.1.rgb_decs.2.body.3.body.2.bias", "1.2.rgb_decs.0.body.4.body.0.weight", "1.2.rgb_decs.0.body.4.body.0.bias", "1.2.rgb_decs.0.body.4.body.2.weight", "1.2.rgb_decs.0.body.4.body.2.bias", "1.2.rgb_decs.0.body.5.weight", "1.2.rgb_decs.0.body.5.bias", "1.2.rgb_decs.0.body.3.body.0.weight", "1.2.rgb_decs.0.body.3.body.0.bias", "1.2.rgb_decs.0.body.3.body.2.weight", "1.2.rgb_decs.0.body.3.body.2.bias", "1.2.rgb_decs.1.body.4.body.0.weight", "1.2.rgb_decs.1.body.4.body.0.bias", "1.2.rgb_decs.1.body.4.body.2.weight", "1.2.rgb_decs.1.body.4.body.2.bias", "1.2.rgb_decs.1.body.5.weight", "1.2.rgb_decs.1.body.5.bias", "1.2.rgb_decs.1.body.3.body.0.weight", "1.2.rgb_decs.1.body.3.body.0.bias", "1.2.rgb_decs.1.body.3.body.2.weight", "1.2.rgb_decs.1.body.3.body.2.bias", "1.2.rgb_decs.2.body.4.body.0.weight", "1.2.rgb_decs.2.body.4.body.0.bias", "1.2.rgb_decs.2.body.4.body.2.weight", "1.2.rgb_decs.2.body.4.body.2.bias", "1.2.rgb_decs.2.body.5.weight", "1.2.rgb_decs.2.body.5.bias", "1.2.rgb_decs.2.body.3.body.0.weight", "1.2.rgb_decs.2.body.3.body.0.bias", "1.2.rgb_decs.2.body.3.body.2.weight", "1.2.rgb_decs.2.body.3.body.2.bias"
Please help me resolve this.
The text was updated successfully, but these errors were encountered:
I ran into the same problem, checked and found that
in train.py
"""
@click.option("--resblocks", type=int, default=5, show_default=True,
help="Number of resblocks to use.")
"""
in eval.py
"""
@click.option("--resblocks", type=int, default=3, show_default=True,
help="Number of resblocks to use.")
"""
These two values should be set to the same
I was training with Cityscapes dataset and I trained and saved the weights with no changes to your code. But when Im loading it in eval.py it is giving the following error.
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/content/gdrive/MyDrive/SReC-master/src/eval.py", line 121, in
main()
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/content/gdrive/MyDrive/SReC-master/src/eval.py", line 95, in main
compressor.nets.load_state_dict(checkpoint["nets"])
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 845, 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: "1.0.rgb_decs.0.body.3.weight", "1.0.rgb_decs.0.body.3.bias", "1.0.rgb_decs.1.body.3.weight", "1.0.rgb_decs.1.body.3.bias", "1.0.rgb_decs.2.body.3.weight", "1.0.rgb_decs.2.body.3.bias", "1.1.rgb_decs.0.body.3.weight", "1.1.rgb_decs.0.body.3.bias", "1.1.rgb_decs.1.body.3.weight", "1.1.rgb_decs.1.body.3.bias", "1.1.rgb_decs.2.body.3.weight", "1.1.rgb_decs.2.body.3.bias", "1.2.rgb_decs.0.body.3.weight", "1.2.rgb_decs.0.body.3.bias", "1.2.rgb_decs.1.body.3.weight", "1.2.rgb_decs.1.body.3.bias", "1.2.rgb_decs.2.body.3.weight", "1.2.rgb_decs.2.body.3.bias".
Unexpected key(s) in state_dict: "1.0.rgb_decs.0.body.4.body.0.weight", "1.0.rgb_decs.0.body.4.body.0.bias", "1.0.rgb_decs.0.body.4.body.2.weight", "1.0.rgb_decs.0.body.4.body.2.bias", "1.0.rgb_decs.0.body.5.weight", "1.0.rgb_decs.0.body.5.bias", "1.0.rgb_decs.0.body.3.body.0.weight", "1.0.rgb_decs.0.body.3.body.0.bias", "1.0.rgb_decs.0.body.3.body.2.weight", "1.0.rgb_decs.0.body.3.body.2.bias", "1.0.rgb_decs.1.body.4.body.0.weight", "1.0.rgb_decs.1.body.4.body.0.bias", "1.0.rgb_decs.1.body.4.body.2.weight", "1.0.rgb_decs.1.body.4.body.2.bias", "1.0.rgb_decs.1.body.5.weight", "1.0.rgb_decs.1.body.5.bias", "1.0.rgb_decs.1.body.3.body.0.weight", "1.0.rgb_decs.1.body.3.body.0.bias", "1.0.rgb_decs.1.body.3.body.2.weight", "1.0.rgb_decs.1.body.3.body.2.bias", "1.0.rgb_decs.2.body.4.body.0.weight", "1.0.rgb_decs.2.body.4.body.0.bias", "1.0.rgb_decs.2.body.4.body.2.weight", "1.0.rgb_decs.2.body.4.body.2.bias", "1.0.rgb_decs.2.body.5.weight", "1.0.rgb_decs.2.body.5.bias", "1.0.rgb_decs.2.body.3.body.0.weight", "1.0.rgb_decs.2.body.3.body.0.bias", "1.0.rgb_decs.2.body.3.body.2.weight", "1.0.rgb_decs.2.body.3.body.2.bias", "1.1.rgb_decs.0.body.4.body.0.weight", "1.1.rgb_decs.0.body.4.body.0.bias", "1.1.rgb_decs.0.body.4.body.2.weight", "1.1.rgb_decs.0.body.4.body.2.bias", "1.1.rgb_decs.0.body.5.weight", "1.1.rgb_decs.0.body.5.bias", "1.1.rgb_decs.0.body.3.body.0.weight", "1.1.rgb_decs.0.body.3.body.0.bias", "1.1.rgb_decs.0.body.3.body.2.weight", "1.1.rgb_decs.0.body.3.body.2.bias", "1.1.rgb_decs.1.body.4.body.0.weight", "1.1.rgb_decs.1.body.4.body.0.bias", "1.1.rgb_decs.1.body.4.body.2.weight", "1.1.rgb_decs.1.body.4.body.2.bias", "1.1.rgb_decs.1.body.5.weight", "1.1.rgb_decs.1.body.5.bias", "1.1.rgb_decs.1.body.3.body.0.weight", "1.1.rgb_decs.1.body.3.body.0.bias", "1.1.rgb_decs.1.body.3.body.2.weight", "1.1.rgb_decs.1.body.3.body.2.bias", "1.1.rgb_decs.2.body.4.body.0.weight", "1.1.rgb_decs.2.body.4.body.0.bias", "1.1.rgb_decs.2.body.4.body.2.weight", "1.1.rgb_decs.2.body.4.body.2.bias", "1.1.rgb_decs.2.body.5.weight", "1.1.rgb_decs.2.body.5.bias", "1.1.rgb_decs.2.body.3.body.0.weight", "1.1.rgb_decs.2.body.3.body.0.bias", "1.1.rgb_decs.2.body.3.body.2.weight", "1.1.rgb_decs.2.body.3.body.2.bias", "1.2.rgb_decs.0.body.4.body.0.weight", "1.2.rgb_decs.0.body.4.body.0.bias", "1.2.rgb_decs.0.body.4.body.2.weight", "1.2.rgb_decs.0.body.4.body.2.bias", "1.2.rgb_decs.0.body.5.weight", "1.2.rgb_decs.0.body.5.bias", "1.2.rgb_decs.0.body.3.body.0.weight", "1.2.rgb_decs.0.body.3.body.0.bias", "1.2.rgb_decs.0.body.3.body.2.weight", "1.2.rgb_decs.0.body.3.body.2.bias", "1.2.rgb_decs.1.body.4.body.0.weight", "1.2.rgb_decs.1.body.4.body.0.bias", "1.2.rgb_decs.1.body.4.body.2.weight", "1.2.rgb_decs.1.body.4.body.2.bias", "1.2.rgb_decs.1.body.5.weight", "1.2.rgb_decs.1.body.5.bias", "1.2.rgb_decs.1.body.3.body.0.weight", "1.2.rgb_decs.1.body.3.body.0.bias", "1.2.rgb_decs.1.body.3.body.2.weight", "1.2.rgb_decs.1.body.3.body.2.bias", "1.2.rgb_decs.2.body.4.body.0.weight", "1.2.rgb_decs.2.body.4.body.0.bias", "1.2.rgb_decs.2.body.4.body.2.weight", "1.2.rgb_decs.2.body.4.body.2.bias", "1.2.rgb_decs.2.body.5.weight", "1.2.rgb_decs.2.body.5.bias", "1.2.rgb_decs.2.body.3.body.0.weight", "1.2.rgb_decs.2.body.3.body.0.bias", "1.2.rgb_decs.2.body.3.body.2.weight", "1.2.rgb_decs.2.body.3.body.2.bias"
Please help me resolve this.
The text was updated successfully, but these errors were encountered: