Skip to content
New issue

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

Error when trying to load pretrained model #7

Open
alqurri77 opened this issue May 18, 2023 · 1 comment
Open

Error when trying to load pretrained model #7

alqurri77 opened this issue May 18, 2023 · 1 comment

Comments

@alqurri77
Copy link

Hi;

I got the fooling error when trying to load the pretrained model:
net.load_state_dict(torch.load( '/tmp/SRFormerLight_SRx2_DIV2K.pth'))

RuntimeError                              Traceback (most recent call last)
Input In [39], in <cell line: 1>()
----> 1 net.load_state_dict(torch.load( '/tmp/SRFormerLight_SRx2_DIV2K.pth'))#  '/tmp/SRFormer_SRx2_DF2K.pth'))
      2 #net= torch.load('/tmp/SRFormer_SRx2_DF2K.pth')
      4 img_size= 48

File /home/software/python/AnacondaPython3.9/lib/python3.9/site-packages/torch/nn/modules/module.py:1497, in Module.load_state_dict(self, state_dict, strict)
   1492         error_msgs.insert(
   1493             0, 'Missing key(s) in state_dict: {}. '.format(
   1494                 ', '.join('"{}"'.format(k) for k in missing_keys)))
   1496 if len(error_msgs) > 0:
-> 1497     raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
   1498                        self.__class__.__name__, "\n\t".join(error_msgs)))
   1499 return _IncompatibleKeys(missing_keys, unexpected_keys)

RuntimeError: Error(s) in loading state_dict for SRFormer:
	Missing key(s) in state_dict: "conv_first.weight", "conv_first.bias", "patch_embed.norm.weight", "patch_embed.norm.bias", "layers.0.residual_group.blocks.0.norm1.weight", "layers.0.residual_group.blocks.0.norm1.bias", "layers.0.residual_group.blocks.0.attn.relative_position_bias_table", "layers.0.residual_group.blocks.0.attn.aligned_relative_position_index", "layers.0.residual_group.blocks.0.attn.kv.weight", "layers.0.residual_group.blocks.0.attn.kv.bias", "layers.0.residual_group.blocks.0.attn.q.weight", "layers.0.residual_group.blocks.0.attn.q.bias", "layers.0.residual_group.blocks.0.attn.proj.weight", "layers.0.residual_group.blocks.0.attn.proj.bias", "layers.0.residual_group.blocks.0.norm2.weight", "layers.0.residual_group.blocks.0.norm2.bias", "layers.0.residual_group.blocks.0.mlp.fc1.weight", "layers.0.residual_group.blocks.0.mlp.fc1.bias", "layers.0.residual_group.blocks.0.mlp.dwconv.depthwise_conv.0.weight", "layers.0.residual_group.blocks.0.mlp.dwconv.depthwise_conv.0.bias", "layers.0.residual_group.blocks.0.mlp.fc2.weight", "layers.0.residual_group.blocks.0.mlp.fc2.bias", "layers.0.residual_group.blocks.1.attn_mask", "layers.0.residual_group.blocks.1.norm1.weight", "layers.0.residual_group.blocks.1.norm1.bias", "layers.0.residual_group.blocks.1.attn.relative_position_bias_table", "layers.0.residual_group.blocks.1.attn.aligned_relative_position_index", "layers.0.residual_group.blocks.1.attn.kv.weight", "layers.0.residual_group.blocks.1.attn.kv.bias", "layers.0.residual_group.blocks.1.attn.q.weight", "layers.0.residual_group.blocks.1.attn.q.bias", "layers.0.residual_group.blocks.1.attn.proj.weight", "layers.0.residual_group.blocks.1.attn.proj.bias", "layers.0.residual_group.blocks.1.norm2.weight", "layers.0.residual_group.blocks.1.norm2.bias", "layers.0.residual_group.blocks.1.mlp.fc1.weight", "layers.0.residual_group.blocks.1.mlp.fc1.bias", "layers.0.residual_group.blocks.1.mlp.dwconv.depthwise_conv.0.weight", "layers.0.residual_group.blocks.1.mlp.dwconv.depthwise_conv.0.bias", "layers.0.residual_group.blocks.1.mlp.fc2.weight", "layers.0.residual_group.blocks.1.mlp.fc2.bias", "layers.0.residual_group.blocks.2.norm1.weight", "layers.0.residual_group.blocks.2.norm1.bias", "layers.0.residual_group.blocks.2.attn.relative_position_bias_table", "layers.0.residual_group.blocks.2.attn.aligned_relative_position_index", "layers.0.residual_group.blocks.2.attn.kv.weight", "layers.0.residual_group.blocks.2.attn.kv.bias", "layers.0.residual_group.blocks.2.attn.q.weight", "layers.0.residual_group.blocks.2.attn.q.bias", "layers.0.residual_group.blocks.2.attn.proj.weight", "layers.0.residual_group.blocks.2.attn.proj.bias", "layers.0.residual_group.blocks.2.norm2.weight", "layers.0.residual_group.blocks.2.norm2.bias", "layers.0.residual_group.blocks.2.mlp.fc1.weight", "layers.0.residual_group.blocks.2.mlp.fc1.bias", "layers.0.residual_group.blocks.2.mlp.dwconv.depthwise_conv.0.weight", "layers.0.residual_group.blocks.2.mlp.dwconv.depthwise_conv.0.bias", "layers.0.residual_group.blocks.2.mlp.fc2.weight", "layers.0.residual_group.blocks.2.mlp.fc2.bias", "layers.0.residual_group.blocks.3.attn_mask", "layers.0.residual_group.blocks.3.norm1.weight", "layers.0.residual_group.blocks.3.norm1.bias", "layers.0.residual_group.blocks.3.attn.relative_position_bias_table", "layers.0.residual_group.blocks.3.attn.aligned_relative_position_index", "layers.0.residual_group.blocks.3.attn.kv.weight", "layers.0.residual_group.blocks.3.attn.kv.bias", "layers.0.residual_group.blocks.3.attn.q.weight", "layers.0.residual_group.blocks.3.attn.q.bias", "layers.0.residual_group.blocks.3.attn.proj.weight", "layers.0.residual_group.blocks.3.attn.proj.bias", "layers.0.residual_group.blocks.3.norm2.weight", "layers.0.residual_group.blocks.3.norm2.bias", "layers.0.residual_group.blocks.3.mlp.fc1.weight", "layers.0.residual_group.blocks.3.mlp.fc1.bias", "layers.0.residual_group.blocks.3.mlp.dwconv.depthwise_conv.0.weight", "layers.0.residual_group.blocks.3.mlp.dwconv.depthwise_conv.0.bias", "layers.0.residual_group.blocks.3.mlp.fc2.weight", "layers.0.residual_group.blocks.3.mlp.fc2.bias", "layers.0.residual_group.blocks.4.norm1.weight", "layers.0.residual_group.blocks.4.norm1.bias", "layers.0.residual_group.blocks.4.attn.relative_position_bias_table", "layers.0.residual_group.blocks.4.attn.aligned_relative_position_index", "layers.0.residual_group.blocks.4.attn.kv.weight", "layers.0.residual_group.blocks.4.attn.kv.bias", "layers.0.residual_group.blocks.4.attn.q.weight", "layers.0.residual_group.blocks.4.attn.q.bias", "layers.0.residual_group.blocks.4.attn.proj.weight", "layers.0.residual_group.blocks.4.attn.proj.bias", "layers.0.residual_group.blocks.4.norm2.weight", "layers.0.residual_group.blocks.4.norm2.bias", "layers.0.residual_group.blocks.4.mlp.fc1.weight", "layers.0.residual_group.blocks.4.mlp.fc1.bias", "layers.0.residual_group.blocks.4.mlp.dwconv.depthwise_conv.0.weight", "layers.0.residual_group.blocks.4.mlp.dwconv.depthwise_conv.0.bias", "layers.0.residual_group.blocks.4.mlp.fc2.weight", "layers.0.residual_group.blocks.4.mlp.fc2.bias", "layers.0.residual_group.blocks.5.attn_mask", "layers.0.residual_group.blocks.5.norm1.weight", "layers.0.residual_group.blocks.5.norm1.bias", "layers.0.residual_group.blocks.5.attn.relative_position_bias_table", "layers.0.residual_group.blocks.5.attn.aligned_relative_position_index", "layers.0.residual_group.blocks.5.attn.kv.weight", "layers.0.residual_group.blocks.5.attn.kv.bias", "layers.0.residual_group.blocks.5.attn.q.weight", "layers.0.residual_group.blocks.5.attn.q.bias", "layers.0.residual_group.blocks.5.attn.proj.weight", "layers.0.residual_group.blocks.5.attn.proj.bias", "layers.0.residual_group.blocks.5.norm2.weight", "layers.0.residual_group.blocks.5.norm2.bias", "layers.0.residual_group.blocks.5.mlp.fc1.weight", "layers.0.residual_group.blocks.5.mlp.fc1.bias", "layers.0.residual_group.blocks.5.mlp.dwconv.depthwise_conv.0.weight", "layers.0.residual_group.blocks.5.mlp.dwconv.depthwise_conv.0.bias", "layers.0.residual_group.blocks.5.mlp.fc2.weight", "layers.0.residual_group.blocks.5.mlp.fc2.bias", "layers.0.conv.weight", "layers.0.conv.bias", "layers.1.residual_group.blocks.0.norm1.weight", "layers.1.residual_group.blocks.0.norm1.bias", "layers.1.residual_group.blocks.0.attn.relative_position_bias_table", "layers.1.residual_group.blocks.0.attn.aligned_relative_position_index", "layers.1.residual_group.blocks.0.attn.kv.weight", "layers.1.residual_group.blocks.0.attn.kv.bias", "layers.1.residual_group.blocks.0.attn.q.weight", "layers.1.residual_group.blocks.0.attn.q.bias", "layers.1.residual_group.blocks.0.attn.proj.weight", "layers.1.residual_group.blocks.0.attn.proj.bias", "layers.1.residual_group.blocks.0.norm2.weight", "layers.1.residual_group.blocks.0.norm2.bias", "layers.1.residual_group.blocks.0.mlp.fc1.weight", "layers.1.residual_group.blocks.0.mlp.fc1.bias", "layers.1.residual_group.blocks.0.mlp.dwconv.depthwise_conv.0.weight", "layers.1.residual_group.blocks.0.mlp.dwconv.depthwise_conv.0.bias", "layers.1.residual_group.blocks.0.mlp.fc2.weight", "layers.1.residual_group.blocks.0.mlp.fc2.bias", "layers.1.residual_group.blocks.1.attn_mask", "layers.1.residual_group.blocks.1.norm1.weight", "layers.1.residual_group.blocks.1.norm1.bias", "layers.1.residual_group.blocks.1.attn.relative_position_bias_table", "layers.1.residual_group.blocks.1.attn.aligned_relative_position_index", "layers.1.residual_group.blocks.1.attn.kv.weight", "layers.1.residual_group.blocks.1.attn.kv.bias", "layers.1.residual_group.blocks.1.attn.q.weight", "layers.1.residual_group.blocks.1.attn.q.bias", "layers.1.residual_group.blocks.1.attn.proj.weight", "layers.1.residual_group.blocks.1.attn.proj.bias", "layers.1.residual_group.blocks.1.norm2.weight", "layers.1.residual_group.blocks.1.norm2.bias", "layers.1.residual_group.blocks.1.mlp.fc1.weight", "layers.1.residual_group.blocks.1.mlp.fc1.bias", "layers.1.residual_group.blocks.1.mlp.dwconv.depthwise_conv.0.weight", "layers.1.residual_group.blocks.1.mlp.dwconv.depthwise_conv.0.bias", "layers.1.residual_group.blocks.1.mlp.fc2.weight", "layers.1.residual_group.blocks.1.mlp.fc2.bias", "layers.1.residual_group.blocks.2.norm1.weight", "layers.1.residual_group.blocks.2.norm1.bias", "layers.1.residual_group.blocks.2.attn.relative_position_bias_table", "layers.1.residual_group.blocks.2.attn.aligned_relative_position_index", "layers.1.residual_group.blocks.2.attn.kv.weight", "layers.1.residual_group.blocks.2.attn.kv.bias", "layers.1.residual_group.blocks.2.attn.q.weight", "layers.1.residual_group.blocks.2.attn.q.bias", "layers.1.residual_group.blocks.2.attn.proj.weight", "layers.1.residual_group.blocks.2.attn.proj.bias", "layers.1.residual_group.blocks.2.norm2.weight", "layers.1.residual_group.blocks.2.norm2.bias", "layers.1.residual_group.blocks.2.mlp.fc1.weight", "layers.1.residual_group.blocks.2.mlp.fc1.bias", "layers.1.residual_group.blocks.2.mlp.dwconv.depthwise_conv.0.weight", "layers.1.residual_group.blocks.2.mlp.dwconv.depthwise_conv.0.bias", "layers.1.residual_group.blocks.2.mlp.fc2.weight", "layers.1.residual_group.blocks.2.mlp.fc2.bias", "layers.1.residual_group.blocks.3.attn_mask", "layers.1.residual_group.blocks.3.norm1.weight", "layers.1.residual_group.blocks.3.norm1.bias", "layers.1.residual_group.blocks.3.attn.relative_position_bias_table", "layers.1.residual_group.blocks.3.attn.aligned_relative_position_index", "layers.1.residual_group.blocks.3.attn.kv.weight", "layers.1.residual_group.blocks.3.attn.kv.bias", "layers.1.residual_group.blocks.3.attn.q.weight", "layers.1.residual_group.blocks.3.attn.q.bias", "layers.1.residual_group.blocks.3.attn.proj.weight", "layers.1.residual_group.blocks.3.attn.proj.bias", "layers.1.residual_group.blocks.3.norm2.weight", "layers.1.residual_group.blocks.3.norm2.bias", "layers.1.residual_group.blocks.3.mlp.fc1.weight", "layers.1.residual_group.blocks.3.mlp.fc1.bias", "layers.1.residual_group.blocks.3.mlp.dwconv.depthwise_conv.0.weight", "layers.1.residual_group.blocks.3.mlp.dwconv.depthwise_conv.0.bias", "layers.1.residual_group.blocks.3.mlp.fc2.weight", "layers.1.residual_group.blocks.3.mlp.fc2.bias", "layers.1.residual_group.blocks.4.norm1.weight", "layers.1.residual_group.blocks.4.norm1.bias", "layers.1.residual_group.blocks.4.attn.relative_position_bias_table", "layers.1.residual_group.blocks.4.attn.aligned_relative_position_index", "layers.1.residual_group.blocks.4.attn.kv.weight", "layers.1.residual_group.blocks.4.attn.kv.bias", "layers.1.residual_group.blocks.4.attn.q.weight", "layers.1.residual_group.blocks.4.attn.q.bias", "layers.1.residual_group.blocks.4.attn.proj.weight", "layers.1.residual_group.blocks.4.attn.proj.bias", "layers.1.residual_group.blocks.4.norm2.weight", "layers.1.residual_group.blocks.4.norm2.bias", "layers.1.residual_group.blocks.4.mlp.fc1.weight", "layers.1.residual_group.blocks.4.mlp.fc1.bias", "layers.1.residual_group.blocks.4.mlp.dwconv.depthwise_conv.0.weight", "layers.1.residual_group.blocks.4.mlp.dwconv.depthwise_conv.0.bias", "layers.1.residual_group.blocks.4.mlp.fc2.weight", "layers.1.residual_group.blocks.4.mlp.fc2.bias", "layers.1.residual_group.blocks.5.attn_mask", "layers.1.residual_group.blocks.5.norm1.weight", "layers.1.residual_group.blocks.5.norm1.bias", "layers.1.residual_group.blocks.5.attn.relative_position_bias_table", "layers.1.residual_group.blocks.5.attn.aligned_relative_position_index", "layers.1.residual_group.blocks.5.attn.kv.weight", "layers.1.residual_group.blocks.5.attn.kv.bias", "layers.1.residual_group.blocks.5.attn.q.weight", "layers.1.residual_group.blocks.5.attn.q.bias", "layers.1.residual_group.blocks.5.attn.proj.weight", "layers.1.residual_group.blocks.5.attn.proj.bias", "layers.1.residual_group.blocks.5.norm2.weight", "layers.1.residual_group.blocks.5.norm2.bias", "layers.1.residual_group.blocks.5.mlp.fc1.weight", "layers.1.residual_group.blocks.5.mlp.fc1.bias", "layers.1.residual_group.blocks.5.mlp.dwconv.depthwise_conv.0.weight", "layers.1.residual_group.blocks.5.mlp.dwconv.depthwise_conv.0.bias", "layers.1.residual_group.blocks.5.mlp.fc2.weight", "layers.1.residual_group.blocks.5.mlp.fc2.bias", "layers.1.conv.weight", "layers.1.conv.bias", "layers.2.residual_group.blocks.0.norm1.weight", "layers.2.residual_group.blocks.0.norm1.bias", "layers.2.residual_group.blocks.0.attn.relative_position_bias_table", "layers.2.residual_group.blocks.0.attn.aligned_relative_position_index", "layers.2.residual_group.blocks.0.attn.kv.weight", "layers.2.residual_group.blocks.0.attn.kv.bias", "layers.2.residual_group.blocks.0.attn.q.weight", "layers.2.residual_group.blocks.0.attn.q.bias", "layers.2.residual_group.blocks.0.attn.proj.weight", "layers.2.residual_group.blocks.0.attn.proj.bias", "layers.2.residual_group.blocks.0.norm2.weight", "layers.2.residual_group.blocks.0.norm2.bias", "layers.2.residual_group.blocks.0.mlp.fc1.weight", "layers.2.residual_group.blocks.0.mlp.fc1.bias", "layers.2.residual_group.blocks.0.mlp.dwconv.depthwise_conv.0.weight", "layers.2.residual_group.blocks.0.mlp.dwconv.depthwise_conv.0.bias", "layers.2.residual_group.blocks.0.mlp.fc2.weight", "layers.2.residual_group.blocks.0.mlp.fc2.bias", "layers.2.residual_group.blocks.1.attn_mask", "layers.2.residual_group.blocks.1.norm1.weight", "layers.2.residual_group.blocks.1.norm1.bias", "layers.2.residual_group.blocks.1.attn.relative_position_bias_table", "layers.2.residual_group.blocks.1.attn.aligned_relative_position_index", "layers.2.residual_group.blocks.1.attn.kv.weight", "layers.2.residual_group.blocks.1.attn.kv.bias", "layers.2.residual_group.blocks.1.attn.q.weight", "layers.2.residual_group.blocks.1.attn.q.bias", "layers.2.residual_group.blocks.1.attn.proj.weight", "layers.2.residual_group.blocks.1.attn.proj.bias", "layers.2.residual_group.blocks.1.norm2.weight", "layers.2.residual_group.blocks.1.norm2.bias", "layers.2.residual_group.blocks.1.mlp.fc1.weight", "layers.2.residual_group.blocks.1.mlp.fc1.bias", "layers.2.residual_group.blocks.1.mlp.dwconv.depthwise_conv.0.weight", "layers.2.residual_group.blocks.1.mlp.dwconv.depthwise_conv.0.bias", "layers.2.residual_group.blocks.1.mlp.fc2.weight", "layers.2.residual_group.blocks.1.mlp.fc2.bias", "layers.2.residual_group.blocks.2.norm1.weight", "layers.2.residual_group.blocks.2.norm1.bias", "layers.2.residual_group.blocks.2.attn.relative_position_bias_table", "layers.2.residual_group.blocks.2.attn.aligned_relative_position_index", "layers.2.residual_group.blocks.2.attn.kv.weight", "layers.2.residual_group.blocks.2.attn.kv.bias", "layers.2.residual_group.blocks.2.attn.q.weight", "layers.2.residual_group.blocks.2.attn.q.bias", "layers.2.residual_group.blocks.2.attn.proj.weight", "layers.2.residual_group.blocks.2.attn.proj.bias", "layers.2.residual_group.blocks.2.norm2.weight", "layers.2.residual_group.blocks.2.norm2.bias", "layers.2.residual_group.blocks.2.mlp.fc1.weight", "layers.2.residual_group.blocks.2.mlp.fc1.bias", "layers.2.residual_group.blocks.2.mlp.dwconv.depthwise_conv.0.weight", "layers.2.residual_group.blocks.2.mlp.dwconv.depthwise_conv.0.bias", "layers.2.residual_group.blocks.2.mlp.fc2.weight", "layers.2.residual_group.blocks.2.mlp.fc2.bias", "layers.2.residual_group.blocks.3.attn_mask", "layers.2.residual_group.blocks.3.norm1.weight", "layers.2.residual_group.blocks.3.norm1.bias", "layers.2.residual_group.blocks.3.attn.relative_position_bias_table", "layers.2.residual_group.blocks.3.attn.aligned_relative_position_index", "layers.2.residual_group.blocks.3.attn.kv.weight", "layers.2.residual_group.blocks.3.attn.kv.bias", "layers.2.residual_group.blocks.3.attn.q.weight", "layers.2.residual_group.blocks.3.attn.q.bias", "layers.2.residual_group.blocks.3.attn.proj.weight", "layers.2.residual_group.blocks.3.attn.proj.bias", "layers.2.residual_group.blocks.3.norm2.weight", "layers.2.residual_group.blocks.3.norm2.bias", "layers.2.residual_group.blocks.3.mlp.fc1.weight", "layers.2.residual_group.blocks.3.mlp.fc1.bias", "layers.2.residual_group.blocks.3.mlp.dwconv.depthwise_conv.0.weight", "layers.2.residual_group.blocks.3.mlp.dwconv.depthwise_conv.0.bias", "layers.2.residual_group.blocks.3.mlp.fc2.weight", "layers.2.residual_group.blocks.3.mlp.fc2.bias", "layers.2.residual_group.blocks.4.norm1.weight", "layers.2.residual_group.blocks.4.norm1.bias", "layers.2.residual_group.blocks.4.attn.relative_position_bias_table", "layers.2.residual_group.blocks.4.attn.aligned_relative_position_index", "layers.2.residual_group.blocks.4.attn.kv.weight", "layers.2.residual_group.blocks.4.attn.kv.bias", "layers.2.residual_group.blocks.4.attn.q.weight", "layers.2.residual_group.blocks.4.attn.q.bias", "layers.2.residual_group.blocks.4.attn.proj.weight", "layers.2.residual_group.blocks.4.attn.proj.bias", "layers.2.residual_group.blocks.4.norm2.weight", "layers.2.residual_group.blocks.4.norm2.bias", "layers.2.residual_group.blocks.4.mlp.fc1.weight", "layers.2.residual_group.blocks.4.mlp.fc1.bias", "layers.2.residual_group.blocks.4.mlp.dwconv.depthwise_conv.0.weight", "layers.2.residual_group.blocks.4.mlp.dwconv.depthwise_conv.0.bias", "layers.2.residual_group.blocks.4.mlp.fc2.weight", "layers.2.residual_group.blocks.4.mlp.fc2.bias", "layers.2.residual_group.blocks.5.attn_mask", "layers.2.residual_group.blocks.5.norm1.weight", "layers.2.residual_group.blocks.5.norm1.bias", "layers.2.residual_group.blocks.5.attn.relative_position_bias_table", "layers.2.residual_group.blocks.5.attn.aligned_relative_position_index", "layers.2.residual_group.blocks.5.attn.kv.weight", "layers.2.residual_group.blocks.5.attn.kv.bias", "layers.2.residual_group.blocks.5.attn.q.weight", "layers.2.residual_group.blocks.5.attn.q.bias", "layers.2.residual_group.blocks.5.attn.proj.weight", "layers.2.residual_group.blocks.5.attn.proj.bias", "layers.2.residual_group.blocks.5.norm2.weight", "layers.2.residual_group.blocks.5.norm2.bias", "layers.2.residual_group.blocks.5.mlp.fc1.weight", "layers.2.residual_group.blocks.5.mlp.fc1.bias", "layers.2.residual_group.blocks.5.mlp.dwconv.depthwise_conv.0.weight", "layers.2.residual_group.blocks.5.mlp.dwconv.depthwise_conv.0.bias", "layers.2.residual_group.blocks.5.mlp.fc2.weight", "layers.2.residual_group.blocks.5.mlp.fc2.bias", "layers.2.conv.weight", "layers.2.conv.bias", "layers.3.residual_group.blocks.0.norm1.weight", "layers.3.residual_group.blocks.0.norm1.bias", "layers.3.residual_group.blocks.0.attn.relative_position_bias_table", "layers.3.residual_group.blocks.0.attn.aligned_relative_position_index", "layers.3.residual_group.blocks.0.attn.kv.weight", "layers.3.residual_group.blocks.0.attn.kv.bias", "layers.3.residual_group.blocks.0.attn.q.weight", "layers.3.residual_group.blocks.0.attn.q.bias", "layers.3.residual_group.blocks.0.attn.proj.weight", "layers.3.residual_group.blocks.0.attn.proj.bias", "layers.3.residual_group.blocks.0.norm2.weight", "layers.3.residual_group.blocks.0.norm2.bias", "layers.3.residual_group.blocks.0.mlp.fc1.weight", "layers.3.residual_group.blocks.0.mlp.fc1.bias", "layers.3.residual_group.blocks.0.mlp.dwconv.depthwise_conv.0.weight", "layers.3.residual_group.blocks.0.mlp.dwconv.depthwise_conv.0.bias", "layers.3.residual_group.blocks.0.mlp.fc2.weight", "layers.3.residual_group.blocks.0.mlp.fc2.bias", "layers.3.residual_group.blocks.1.attn_mask", "layers.3.residual_group.blocks.1.norm1.weight", "layers.3.residual_group.blocks.1.norm1.bias", "layers.3.residual_group.blocks.1.attn.relative_position_bias_table", "layers.3.residual_group.blocks.1.attn.aligned_relative_position_index", "layers.3.residual_group.blocks.1.attn.kv.weight", "layers.3.residual_group.blocks.1.attn.kv.bias", "layers.3.residual_group.blocks.1.attn.q.weight", "layers.3.residual_group.blocks.1.attn.q.bias", "layers.3.residual_group.blocks.1.attn.proj.weight", "layers.3.residual_group.blocks.1.attn.proj.bias", "layers.3.residual_group.blocks.1.norm2.weight", "layers.3.residual_group.blocks.1.norm2.bias", "layers.3.residual_group.blocks.1.mlp.fc1.weight", "layers.3.residual_group.blocks.1.mlp.fc1.bias", "layers.3.residual_group.blocks.1.mlp.dwconv.depthwise_conv.0.weight", "layers.3.residual_group.blocks.1.mlp.dwconv.depthwise_conv.0.bias", "layers.3.residual_group.blocks.1.mlp.fc2.weight", "layers.3.residual_group.blocks.1.mlp.fc2.bias", "layers.3.residual_group.blocks.2.norm1.weight", "layers.3.residual_group.blocks.2.norm1.bias", "layers.3.residual_group.blocks.2.attn.relative_position_bias_table", "layers.3.residual_group.blocks.2.attn.aligned_relative_position_index", "layers.3.residual_group.blocks.2.attn.kv.weight", "layers.3.residual_group.blocks.2.attn.kv.bias", "layers.3.residual_group.blocks.2.attn.q.weight", "layers.3.residual_group.blocks.2.attn.q.bias", "layers.3.residual_group.blocks.2.attn.proj.weight", "layers.3.residual_group.blocks.2.attn.proj.bias", "layers.3.residual_group.blocks.2.norm2.weight", "layers.3.residual_group.blocks.2.norm2.bias", "layers.3.residual_group.blocks.2.mlp.fc1.weight", "layers.3.residual_group.blocks.2.mlp.fc1.bias", "layers.3.residual_group.blocks.2.mlp.dwconv.depthwise_conv.0.weight", "layers.3.residual_group.blocks.2.mlp.dwconv.depthwise_conv.0.bias", "layers.3.residual_group.blocks.2.mlp.fc2.weight", "layers.3.residual_group.blocks.2.mlp.fc2.bias", "layers.3.residual_group.blocks.3.attn_mask", "layers.3.residual_group.blocks.3.norm1.weight", "layers.3.residual_group.blocks.3.norm1.bias", "layers.3.residual_group.blocks.3.attn.relative_position_bias_table", "layers.3.residual_group.blocks.3.attn.aligned_relative_position_index", "layers.3.residual_group.blocks.3.attn.kv.weight", "layers.3.residual_group.blocks.3.attn.kv.bias", "layers.3.residual_group.blocks.3.attn.q.weight", "layers.3.residual_group.blocks.3.attn.q.bias", "layers.3.residual_group.blocks.3.attn.proj.weight", "layers.3.residual_group.blocks.3.attn.proj.bias", "layers.3.residual_group.blocks.3.norm2.weight", "layers.3.residual_group.blocks.3.norm2.bias", "layers.3.residual_group.blocks.3.mlp.fc1.weight", "layers.3.residual_group.blocks.3.mlp.fc1.bias", "layers.3.residual_group.blocks.3.mlp.dwconv.depthwise_conv.0.weight", "layers.3.residual_group.blocks.3.mlp.dwconv.depthwise_conv.0.bias", "layers.3.residual_group.blocks.3.mlp.fc2.weight", "layers.3.residual_group.blocks.3.mlp.fc2.bias", "layers.3.residual_group.blocks.4.norm1.weight", "layers.3.residual_group.blocks.4.norm1.bias", "layers.3.residual_group.blocks.4.attn.relative_position_bias_table", "layers.3.residual_group.blocks.4.attn.aligned_relative_position_index", "layers.3.residual_group.blocks.4.attn.kv.weight", "layers.3.residual_group.blocks.4.attn.kv.bias", "layers.3.residual_group.blocks.4.attn.q.weight", "layers.3.residual_group.blocks.4.attn.q.bias", "layers.3.residual_group.blocks.4.attn.proj.weight", "layers.3.residual_group.blocks.4.attn.proj.bias", "layers.3.residual_group.blocks.4.norm2.weight", "layers.3.residual_group.blocks.4.norm2.bias", "layers.3.residual_group.blocks.4.mlp.fc1.weight", "layers.3.residual_group.blocks.4.mlp.fc1.bias", "layers.3.residual_group.blocks.4.mlp.dwconv.depthwise_conv.0.weight", "layers.3.residual_group.blocks.4.mlp.dwconv.depthwise_conv.0.bias", "layers.3.residual_group.blocks.4.mlp.fc2.weight", "layers.3.residual_group.blocks.4.mlp.fc2.bias", "layers.3.residual_group.blocks.5.attn_mask", "layers.3.residual_group.blocks.5.norm1.weight", "layers.3.residual_group.blocks.5.norm1.bias", "layers.3.residual_group.blocks.5.attn.relative_position_bias_table", "layers.3.residual_group.blocks.5.attn.aligned_relative_position_index", "layers.3.residual_group.blocks.5.attn.kv.weight", "layers.3.residual_group.blocks.5.attn.kv.bias", "layers.3.residual_group.blocks.5.attn.q.weight", "layers.3.residual_group.blocks.5.attn.q.bias", "layers.3.residual_group.blocks.5.attn.proj.weight", "layers.3.residual_group.blocks.5.attn.proj.bias", "layers.3.residual_group.blocks.5.norm2.weight", "layers.3.residual_group.blocks.5.norm2.bias", "layers.3.residual_group.blocks.5.mlp.fc1.weight", "layers.3.residual_group.blocks.5.mlp.fc1.bias", "layers.3.residual_group.blocks.5.mlp.dwconv.depthwise_conv.0.weight", "layers.3.residual_group.blocks.5.mlp.dwconv.depthwise_conv.0.bias", "layers.3.residual_group.blocks.5.mlp.fc2.weight", "layers.3.residual_group.blocks.5.mlp.fc2.bias", "layers.3.conv.weight", "layers.3.conv.bias", "layers.4.residual_group.blocks.0.norm1.weight", "layers.4.residual_group.blocks.0.norm1.bias", "layers.4.residual_group.blocks.0.attn.relative_position_bias_table", "layers.4.residual_group.blocks.0.attn.aligned_relative_position_index", "layers.4.residual_group.blocks.0.attn.kv.weight", "layers.4.residual_group.blocks.0.attn.kv.bias", "layers.4.residual_group.blocks.0.attn.q.weight", "layers.4.residual_group.blocks.0.attn.q.bias", "layers.4.residual_group.blocks.0.attn.proj.weight", "layers.4.residual_group.blocks.0.attn.proj.bias", "layers.4.residual_group.blocks.0.norm2.weight", "layers.4.residual_group.blocks.0.norm2.bias", "layers.4.residual_group.blocks.0.mlp.fc1.weight", "layers.4.residual_group.blocks.0.mlp.fc1.bias", "layers.4.residual_group.blocks.0.mlp.dwconv.depthwise_conv.0.weight", "layers.4.residual_group.blocks.0.mlp.dwconv.depthwise_conv.0.bias", "layers.4.residual_group.blocks.0.mlp.fc2.weight", "layers.4.residual_group.blocks.0.mlp.fc2.bias", "layers.4.residual_group.blocks.1.attn_mask", "layers.4.residual_group.blocks.1.norm1.weight", "layers.4.residual_group.blocks.1.norm1.bias", "layers.4.residual_group.blocks.1.attn.relative_position_bias_table", "layers.4.residual_group.blocks.1.attn.aligned_relative_position_index", "layers.4.residual_group.blocks.1.attn.kv.weight", "layers.4.residual_group.blocks.1.attn.kv.bias", "layers.4.residual_group.blocks.1.attn.q.weight", "layers.4.residual_group.blocks.1.attn.q.bias", "layers.4.residual_group.blocks.1.attn.proj.weight", "layers.4.residual_group.blocks.1.attn.proj.bias", "layers.4.residual_group.blocks.1.norm2.weight", "layers.4.residual_group.blocks.1.norm2.bias", "layers.4.residual_group.blocks.1.mlp.fc1.weight", "layers.4.residual_group.blocks.1.mlp.fc1.bias", "layers.4.residual_group.blocks.1.mlp.dwconv.depthwise_conv.0.weight", "layers.4.residual_group.blocks.1.mlp.dwconv.depthwise_conv.0.bias", "layers.4.residual_group.blocks.1.mlp.fc2.weight", "layers.4.residual_group.blocks.1.mlp.fc2.bias", "layers.4.residual_group.blocks.2.norm1.weight", "layers.4.residual_group.blocks.2.norm1.bias", "layers.4.residual_group.blocks.2.attn.relative_position_bias_table", "layers.4.residual_group.blocks.2.attn.aligned_relative_position_index", "layers.4.residual_group.blocks.2.attn.kv.weight", "layers.4.residual_group.blocks.2.attn.kv.bias", "layers.4.residual_group.blocks.2.attn.q.weight", "layers.4.residual_group.blocks.2.attn.q.bias", "layers.4.residual_group.blocks.2.attn.proj.weight", "layers.4.residual_group.blocks.2.attn.proj.bias", "layers.4.residual_group.blocks.2.norm2.weight", "layers.4.residual_group.blocks.2.norm2.bias", "layers.4.residual_group.blocks.2.mlp.fc1.weight", "layers.4.residual_group.blocks.2.mlp.fc1.bias", "layers.4.residual_group.blocks.2.mlp.dwconv.depthwise_conv.0.weight", "layers.4.residual_group.blocks.2.mlp.dwconv.depthwise_conv.0.bias", "layers.4.residual_group.blocks.2.mlp.fc2.weight", "layers.4.residual_group.blocks.2.mlp.fc2.bias", "layers.4.residual_group.blocks.3.attn_mask", "layers.4.residual_group.blocks.3.norm1.weight", "layers.4.residual_group.blocks.3.norm1.bias", "layers.4.residual_group.blocks.3.attn.relative_position_bias_table", "layers.4.residual_group.blocks.3.attn.aligned_relative_position_index", "layers.4.residual_group.blocks.3.attn.kv.weight", "layers.4.residual_group.blocks.3.attn.kv.bias", "layers.4.residual_group.blocks.3.attn.q.weight", "layers.4.residual_group.blocks.3.attn.q.bias", "layers.4.residual_group.blocks.3.attn.proj.weight", "layers.4.residual_group.blocks.3.attn.proj.bias", "layers.4.residual_group.blocks.3.norm2.weight", "layers.4.residual_group.blocks.3.norm2.bias", "layers.4.residual_group.blocks.3.mlp.fc1.weight", "layers.4.residual_group.blocks.3.mlp.fc1.bias", "layers.4.residual_group.blocks.3.mlp.dwconv.depthwise_conv.0.weight", "layers.4.residual_group.blocks.3.mlp.dwconv.depthwise_conv.0.bias", "layers.4.residual_group.blocks.3.mlp.fc2.weight", "layers.4.residual_group.blocks.3.mlp.fc2.bias", "layers.4.residual_group.blocks.4.norm1.weight", "layers.4.residual_group.blocks.4.norm1.bias", "layers.4.residual_group.blocks.4.attn.relative_position_bias_table", "layers.4.residual_group.blocks.4.attn.aligned_relative_position_index", "layers.4.residual_group.blocks.4.attn.kv.weight", "layers.4.residual_group.blocks.4.attn.kv.bias", "layers.4.residual_group.blocks.4.attn.q.weight", "layers.4.residual_group.blocks.4.attn.q.bias", "layers.4.residual_group.blocks.4.attn.proj.weight", "layers.4.residual_group.blocks.4.attn.proj.bias", "layers.4.residual_group.blocks.4.norm2.weight", "layers.4.residual_group.blocks.4.norm2.bias", "layers.4.residual_group.blocks.4.mlp.fc1.weight", "layers.4.residual_group.blocks.4.mlp.fc1.bias", "layers.4.residual_group.blocks.4.mlp.dwconv.depthwise_conv.0.weight", "layers.4.residual_group.blocks.4.mlp.dwconv.depthwise_conv.0.bias", "layers.4.residual_group.blocks.4.mlp.fc2.weight", "layers.4.residual_group.blocks.4.mlp.fc2.bias", "layers.4.residual_group.blocks.5.attn_mask", "layers.4.residual_group.blocks.5.norm1.weight", "layers.4.residual_group.blocks.5.norm1.bias", "layers.4.residual_group.blocks.5.attn.relative_position_bias_table", "layers.4.residual_group.blocks.5.attn.aligned_relative_position_index", "layers.4.residual_group.blocks.5.attn.kv.weight", "layers.4.residual_group.blocks.5.attn.kv.bias", "layers.4.residual_group.blocks.5.attn.q.weight", "layers.4.residual_group.blocks.5.attn.q.bias", "layers.4.residual_group.blocks.5.attn.proj.weight", "layers.4.residual_group.blocks.5.attn.proj.bias", "layers.4.residual_group.blocks.5.norm2.weight", "layers.4.residual_group.blocks.5.norm2.bias", "layers.4.residual_group.blocks.5.mlp.fc1.weight", "layers.4.residual_group.blocks.5.mlp.fc1.bias", "layers.4.residual_group.blocks.5.mlp.dwconv.depthwise_conv.0.weight", "layers.4.residual_group.blocks.5.mlp.dwconv.depthwise_conv.0.bias", "layers.4.residual_group.blocks.5.mlp.fc2.weight", "layers.4.residual_group.blocks.5.mlp.fc2.bias", "layers.4.conv.weight", "layers.4.conv.bias", "layers.5.residual_group.blocks.0.norm1.weight", "layers.5.residual_group.blocks.0.norm1.bias", "layers.5.residual_group.blocks.0.attn.relative_position_bias_table", "layers.5.residual_group.blocks.0.attn.aligned_relative_position_index", "layers.5.residual_group.blocks.0.attn.kv.weight", "layers.5.residual_group.blocks.0.attn.kv.bias", "layers.5.residual_group.blocks.0.attn.q.weight", "layers.5.residual_group.blocks.0.attn.q.bias", "layers.5.residual_group.blocks.0.attn.proj.weight", "layers.5.residual_group.blocks.0.attn.proj.bias", "layers.5.residual_group.blocks.0.norm2.weight", "layers.5.residual_group.blocks.0.norm2.bias", "layers.5.residual_group.blocks.0.mlp.fc1.weight", "layers.5.residual_group.blocks.0.mlp.fc1.bias", "layers.5.residual_group.blocks.0.mlp.dwconv.depthwise_conv.0.weight", "layers.5.residual_group.blocks.0.mlp.dwconv.depthwise_conv.0.bias", "layers.5.residual_group.blocks.0.mlp.fc2.weight", "layers.5.residual_group.blocks.0.mlp.fc2.bias", "layers.5.residual_group.blocks.1.attn_mask", "layers.5.residual_group.blocks.1.norm1.weight", "layers.5.residual_group.blocks.1.norm1.bias", "layers.5.residual_group.blocks.1.attn.relative_position_bias_table", "layers.5.residual_group.blocks.1.attn.aligned_relative_position_index", "layers.5.residual_group.blocks.1.attn.kv.weight", "layers.5.residual_group.blocks.1.attn.kv.bias", "layers.5.residual_group.blocks.1.attn.q.weight", "layers.5.residual_group.blocks.1.attn.q.bias", "layers.5.residual_group.blocks.1.attn.proj.weight", "layers.5.residual_group.blocks.1.attn.proj.bias", "layers.5.residual_group.blocks.1.norm2.weight", "layers.5.residual_group.blocks.1.norm2.bias", "layers.5.residual_group.blocks.1.mlp.fc1.weight", "layers.5.residual_group.blocks.1.mlp.fc1.bias", "layers.5.residual_group.blocks.1.mlp.dwconv.depthwise_conv.0.weight", "layers.5.residual_group.blocks.1.mlp.dwconv.depthwise_conv.0.bias", "layers.5.residual_group.blocks.1.mlp.fc2.weight", "layers.5.residual_group.blocks.1.mlp.fc2.bias", "layers.5.residual_group.blocks.2.norm1.weight", "layers.5.residual_group.blocks.2.norm1.bias", "layers.5.residual_group.blocks.2.attn.relative_position_bias_table", "layers.5.residual_group.blocks.2.attn.aligned_relative_position_index", "layers.5.residual_group.blocks.2.attn.kv.weight", "layers.5.residual_group.blocks.2.attn.kv.bias", "layers.5.residual_group.blocks.2.attn.q.weight", "layers.5.residual_group.blocks.2.attn.q.bias", "layers.5.residual_group.blocks.2.attn.proj.weight", "layers.5.residual_group.blocks.2.attn.proj.bias", "layers.5.residual_group.blocks.2.norm2.weight", "layers.5.residual_group.blocks.2.norm2.bias", "layers.5.residual_group.blocks.2.mlp.fc1.weight", "layers.5.residual_group.blocks.2.mlp.fc1.bias", "layers.5.residual_group.blocks.2.mlp.dwconv.depthwise_conv.0.weight", "layers.5.residual_group.blocks.2.mlp.dwconv.depthwise_conv.0.bias", "layers.5.residual_group.blocks.2.mlp.fc2.weight", "layers.5.residual_group.blocks.2.mlp.fc2.bias", "layers.5.residual_group.blocks.3.attn_mask", "layers.5.residual_group.blocks.3.norm1.weight", "layers.5.residual_group.blocks.3.norm1.bias", "layers.5.residual_group.blocks.3.attn.relative_position_bias_table", "layers.5.residual_group.blocks.3.attn.aligned_relative_position_index", "layers.5.residual_group.blocks.3.attn.kv.weight", "layers.5.residual_group.blocks.3.attn.kv.bias", "layers.5.residual_group.blocks.3.attn.q.weight", "layers.5.residual_group.blocks.3.attn.q.bias", "layers.5.residual_group.blocks.3.attn.proj.weight", "layers.5.residual_group.blocks.3.attn.proj.bias", "layers.5.residual_group.blocks.3.norm2.weight", "layers.5.residual_group.blocks.3.norm2.bias", "layers.5.residual_group.blocks.3.mlp.fc1.weight", "layers.5.residual_group.blocks.3.mlp.fc1.bias", "layers.5.residual_group.blocks.3.mlp.dwconv.depthwise_conv.0.weight", "layers.5.residual_group.blocks.3.mlp.dwconv.depthwise_conv.0.bias", "layers.5.residual_group.blocks.3.mlp.fc2.weight", "layers.5.residual_group.blocks.3.mlp.fc2.bias", "layers.5.residual_group.blocks.4.norm1.weight", "layers.5.residual_group.blocks.4.norm1.bias", "layers.5.residual_group.blocks.4.attn.relative_position_bias_table", "layers.5.residual_group.blocks.4.attn.aligned_relative_position_index", "layers.5.residual_group.blocks.4.attn.kv.weight", "layers.5.residual_group.blocks.4.attn.kv.bias", "layers.5.residual_group.blocks.4.attn.q.weight", "layers.5.residual_group.blocks.4.attn.q.bias", "layers.5.residual_group.blocks.4.attn.proj.weight", "layers.5.residual_group.blocks.4.attn.proj.bias", "layers.5.residual_group.blocks.4.norm2.weight", "layers.5.residual_group.blocks.4.norm2.bias", "layers.5.residual_group.blocks.4.mlp.fc1.weight", "layers.5.residual_group.blocks.4.mlp.fc1.bias", "layers.5.residual_group.blocks.4.mlp.dwconv.depthwise_conv.0.weight", "layers.5.residual_group.blocks.4.mlp.dwconv.depthwise_conv.0.bias", "layers.5.residual_group.blocks.4.mlp.fc2.weight", "layers.5.residual_group.blocks.4.mlp.fc2.bias", "layers.5.residual_group.blocks.5.attn_mask", "layers.5.residual_group.blocks.5.norm1.weight", "layers.5.residual_group.blocks.5.norm1.bias", "layers.5.residual_group.blocks.5.attn.relative_position_bias_table", "layers.5.residual_group.blocks.5.attn.aligned_relative_position_index", "layers.5.residual_group.blocks.5.attn.kv.weight", "layers.5.residual_group.blocks.5.attn.kv.bias", "layers.5.residual_group.blocks.5.attn.q.weight", "layers.5.residual_group.blocks.5.attn.q.bias", "layers.5.residual_group.blocks.5.attn.proj.weight", "layers.5.residual_group.blocks.5.attn.proj.bias", "layers.5.residual_group.blocks.5.norm2.weight", "layers.5.residual_group.blocks.5.norm2.bias", "layers.5.residual_group.blocks.5.mlp.fc1.weight", "layers.5.residual_group.blocks.5.mlp.fc1.bias", "layers.5.residual_group.blocks.5.mlp.dwconv.depthwise_conv.0.weight", "layers.5.residual_group.blocks.5.mlp.dwconv.depthwise_conv.0.bias", "layers.5.residual_group.blocks.5.mlp.fc2.weight", "layers.5.residual_group.blocks.5.mlp.fc2.bias", "layers.5.conv.weight", "layers.5.conv.bias", "norm.weight", "norm.bias", "conv_after_body.weight", "conv_after_body.bias", "conv_before_upsample.0.weight", "conv_before_upsample.0.bias", "upsample.0.weight", "upsample.0.bias", "conv_last.weight", "conv_last.bias". 
	Unexpected key(s) in state_dict: "params". 

@Z-YuPeng
Copy link
Collaborator

Sorry for later reply, may be you can do that:

net.load_state_dict(torch.load( '/tmp/SRFormerLight_SRx2_DIV2K.pth')['params'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants