We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to load parameters from "SRFBN_x2_BI.pth" to your torch model "SRFBN", but the following error is raised (i have not use your solver):
RuntimeError: Error(s) in loading state_dict for SRFBN: Missing key(s) in state_dict: "sub_mean.weight", "sub_mean.bias", "conv_in.0.weight", "conv_in.0.bias", "conv_in.1.weight", "feat_in.0.weight", "feat_in.0.bias", "feat_in.1.weight", "block.compress_in.0.weight", "block.compress_in.0.bias", "block.compress_in.1.weight", "block.upBlocks.0.0.weight", "block.upBlocks.0.0.bias", "block.upBlocks.0.1.weight", "block.upBlocks.1.0.weight", "block.upBlocks.1.0.bias", "block.upBlocks.1.1.weight", "block.upBlocks.2.0.weight", "block.upBlocks.2.0.bias", "block.upBlocks.2.1.weight", "block.upBlocks.3.0.weight", "block.upBlocks.3.0.bias", "block.upBlocks.3.1.weight", "block.upBlocks.4.0.weight", "block.upBlocks.4.0.bias", "block.upBlocks.4.1.weight", "block.upBlocks.5.0.weight", "block.upBlocks.5.0.bias", "block.upBlocks.5.1.weight", "block.downBlocks.0.0.weight", "block.downBlocks.0.0.bias", "block.downBlocks.0.1.weight", "block." ..................................
My code is show below:
import torch from SRFBN_CVPR19_Models.srfbn_arch import SRFBN sr_model = SRFBN(in_channels=3,out_channels=3,num_features=64,num_steps=4,num_groups=6,upscale_factor=2) params = torch.load("/home/<USER NAME>/<DIR>/SRFBN_CVPR19_Models/SRFBN_x2_BI.pth") if 'state_dict' in params.keys(): params = params['state_dict'] sr_model.load_state_dict(params)
Thanks in advance 🙂
The text was updated successfully, but these errors were encountered:
I think that this could be a solution. I just removed "module." from the beginning of the dictionary keys' names.
Sorry, something went wrong.
No branches or pull requests
I am trying to load parameters from "SRFBN_x2_BI.pth" to your torch model "SRFBN", but the following error is raised (i have not use your solver):
My code is show below:
Thanks in advance 🙂
The text was updated successfully, but these errors were encountered: