OliverRensu / SG-Former

79 stars 10 forks source link

An error occurred when importing pre-trained model parameters. #2

Open lihuinian opened 11 months ago

lihuinian commented 11 months ago

Starting Pretrained B_SGFormer Model SGFormer Traceback (most recent call last): File "trainval.py", line 135, in main() File "trainval.py", line 56, in main model = build_model(cfg) File "/root/Image_An/model/build.py", line 39, in build_model model = SGFormerModel(cfg) File "/root/Image_An/model/model.py", line 22, in init self.model.load_state_dict(torch.load(model_save_path)) File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 705, in load with _open_zipfile_reader(opened_file) as opened_zipfile: File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 243, in init super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer)) RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

lihuinian commented 11 months ago

root@autodl-container-7dd911a9fa-736d39ee:~/Image_An# python trainval.py Starting Pretrained S_SGFormer Model SGFormer Traceback (most recent call last): File "trainval.py", line 135, in main() File "trainval.py", line 56, in main model = build_model(cfg) File "/root/Image_An/model/build.py", line 39, in build_model model = SGFormerModel(cfg) File "/root/Image_An/model/model.py", line 28, in init self.model.load_state_dict(torch.load(model_save_path)) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1497, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for SGFormer: Missing key(s) in state_dict: "pos_embed", "patch_embed1.conv.0.c.weight", "patch_embed1.conv.0.bn.weight", "patch_embed1.conv.0.bn.bias", "patch_embed1.conv.2.c.weight", "patch_embed1.conv.2.bn.weight", "patch_embed1.conv.2.bn.bias", "patch_embed1.conv.4.c.weight", "patch_embed1.conv.4.bn.weight", "patch_embed1.conv.4.bn.bias", "patch_embed1.norm.weight", "patch_embed1.norm.bias", "block1.0.norm1.weight", "block1.0.norm1.bias", "block1.0.attn.sr.weight", "block1.0.attn.sr.bias", "block1.0.attn.norm.weight", "block1.0.attn.norm.bias", "block1.0.attn.q1.weight", "block1.0.attn.q1.bias", "block1.0.attn.kv1.weight", "block1.0.attn.kv1.bias", "block1.0.attn.q2.weight", "block1.0.attn.q2.bias", "block1.0.attn.kv2.weight", "block1.0.attn.kv2.bias", "block1.0.attn.lepe_linear.weight", "block1.0.attn.lepe_linear.bias", "block1.0.attn.lepe_conv.weight", "block1.0.attn.lepe_conv.bias", "block1.0.attn.proj.weight", "block1.0.attn.proj.bias", "block1.0.norm2.weight", "block1.0.norm2.bias", "block1.0.mlp.fc1.weight", "block1.0.mlp.fc1.bias", "block1.0.mlp.dwconv.dwconv.weight", "block1.0.mlp.dwconv.dwconv.bias", "block1.0.mlp.fc2.weight", "block1.0.mlp.fc2.bias", "block1.1.norm1.weight", "block1.1.norm1.bias", "block1.1.attn.q.weight", "block1.1.attn.q.bias", "block1.1.attn.kv1.weight", "block1.1.attn.kv1.bias", "block1.1.attn.kv2.weight", "block1.1.attn.kv2.bias", "block1.1.attn.f1.weight", "block1.1.attn.f1.bias", "block1.1.attn.f2.weight", "block1.1.attn.f2.bias", "block1.1.attn.f3.weight", "block1.1.attn.f3.bias", "block1.1.attn.lepe_linear.weight", "block1.1.attn.lepe_linear.bias", "block1.1.attn.lepe_conv.weight", "block1.1.attn.lepe_conv.bias", "block1.1.attn.proj.weight", "block1.1.attn.proj.bias", "block1.1.norm2.weight", "block1.1.norm2.bias", "block1.1.mlp.fc1.weight", "block1.1.mlp.fc1.bias", "block1.1.mlp.dwconv.dwconv.weight", "block1.1.mlp.dwconv.dwconv.bias", "block1.1.mlp.fc2.weight", "block1.1.mlp.fc2.bias", "norm1.weight", "norm1.bias", "patch_embed2.conv1.c.weight", "patch_embed2.conv1.bn.weight", "patch_embed2.conv1.bn.bias", "patch_embed2.conv2.c.weight", "patch_embed2.conv2.bn.weight", "patch_embed2.conv2.bn.bias", "patch_embed2.conv3.c.weight", "patch_embed2.conv3.bn.weight", "patch_embed2.conv3.bn.bias", "block2.0.norm1.weight", "block2.0.norm1.bias", "block2.0.attn.sr.weight", "block2.0.attn.sr.bias", "block2.0.attn.norm.weight", "block2.0.attn.norm.bias", "block2.0.attn.q1.weight", "block2.0.attn.q1.bias", "block2.0.attn.kv1.weight", "block2.0.attn.kv1.bias", "block2.0.attn.q2.weight", "block2.0.attn.q2.bias", "block2.0.attn.kv2.weight", "block2.0.attn.kv2.bias", "block2.0.attn.lepe_linear.weight", "block2.0.attn.lepe_linear.bias", "block2.0.attn.lepe_conv.weight", "block2.0.attn.lepe_conv.bias", "block2.0.attn.proj.weight", "block2.0.attn.proj.bias", "block2.0.norm2.weight", "block2.0.norm2.bias", "block2.0.mlp.fc1.weight", "block2.0.mlp.fc1.bias", "block2.0.mlp.dwconv.dwconv.weight", "block2.0.mlp.dwconv.dwconv.bias", "block2.0.mlp.fc2.weight", "block2.0.mlp.fc2.bias", "block2.1.norm1.weight", "block2.1.norm1.bias", "block2.1.attn.q.weight", "block2.1.attn.q.bias", "block2.1.attn.kv1.weight", "block2.1.attn.kv1.bias", "block2.1.attn.kv2.weight", "block2.1.attn.kv2.bias", "block2.1.attn.f1.weight", "block2.1.attn.f1.bias", "block2.1.attn.f2.weight", "block2.1.attn.f2.bias", "block2.1.attn.f3.weight", "block2.1.attn.f3.bias", "block2.1.attn.lepe_linear.weight", "block2.1.attn.lepe_linear.bias", "block2.1.attn.lepe_conv.weight", "block2.1.attn.lepe_conv.bias", "block2.1.attn.proj.weight", "block2.1.attn.proj.bias", "block2.1.norm2.weight", "block2.1.norm2.bias", "block2.1.mlp.fc1.weight", "block2.1.mlp.fc1.bias", "block2.1.mlp.dwconv.dwconv.weight", "block2.1.mlp.dwconv.dwconv.bias", "block2.1.mlp.fc2.weight", "block2.1.mlp.fc2.bias", "block2.2.norm1.weight", "block2.2.norm1.bias", "block2.2.attn.sr.weight", "block2.2.attn.sr.bias", "block2.2.attn.norm.weight", "block2.2.attn.norm.bias", "block2.2.attn.q1.weight", "block2.2.attn.q1.bias", "block2.2.attn.kv1.weight", "block2.2.attn.kv1.bias", "block2.2.attn.q2.weight", "block2.2.attn.q2.bias", "block2.2.attn.kv2.weight", "block2.2.attn.kv2.bias", "block2.2.attn.lepe_linear.weight", "block2.2.attn.lepe_linear.bias", "block2.2.attn.lepe_conv.weight", "block2.2.attn.lepe_conv.bias", "block2.2.attn.proj.weight", "block2.2.attn.proj.bias", "block2.2.norm2.weight", "block2.2.norm2.bias", "block2.2.mlp.fc1.weight", "block2.2.mlp.fc1.bias", "block2.2.mlp.dwconv.dwconv.weight", "block2.2.mlp.dwconv.dwconv.bias", "block2.2.mlp.fc2.weight", "block2.2.mlp.fc2.bias", "block2.3.norm1.weight", "block2.3.norm1.bias", "block2.3.attn.q.weight", "block2.3.attn.q.bias", "block2.3.attn.kv1.weight", "block2.3.attn.kv1.bias", "block2.3.attn.kv2.weight", "block2.3.attn.kv2.bias", "block2.3.attn.f1.weight", "block2.3.attn.f1.bias", "block2.3.attn.f2.weight", "block2.3.attn.f2.bias", "block2.3.attn.f3.weight", "block2.3.attn.f3.bias", "block2.3.attn.lepe_linear.weight", "block2.3.attn.lepe_linear.bias", "block2.3.attn.lepe_conv.weight", "block2.3.attn.lepe_conv.bias", "block2.3.attn.proj.weight", "block2.3.attn.proj.bias", "block2.3.norm2.weight", "block2.3.norm2.bias", "block2.3.mlp.fc1.weight", "block2.3.mlp.fc1.bias", "block2.3.mlp.dwconv.dwconv.weight", "block2.3.mlp.dwconv.dwconv.bias", "block2.3.mlp.fc2.weight", "block2.3.mlp.fc2.bias", "norm2.weight", "norm2.bias", "patch_embed3.conv1.c.weight", "patch_embed3.conv1.bn.weight", "patch_embed3.conv1.bn.bias", "patch_embed3.conv2.c.weight", "patch_embed3.conv2.bn.weight", "patch_embed3.conv2.bn.bias", "patch_embed3.conv3.c.weight", "patch_embed3.conv3.bn.weight", "patch_embed3.conv3.bn.bias", "block3.0.norm1.weight", "block3.0.norm1.bias", "block3.0.attn.sr.weight", "block3.0.attn.sr.bias", "block3.0.attn.norm.weight", "block3.0.attn.norm.bias", "block3.0.attn.q1.weight", "block3.0.attn.q1.bias", "block3.0.attn.kv1.weight", "block3.0.attn.kv1.bias", "block3.0.attn.q2.weight", "block3.0.attn.q2.bias", "block3.0.attn.kv2.weight", "block3.0.attn.kv2.bias", "block3.0.attn.lepe_linear.weight", "block3.0.attn.lepe_linear.bias", "block3.0.attn.lepe_conv.weight", "block3.0.attn.lepe_conv.bias", "block3.0.attn.proj.weight", "block3.0.attn.proj.bias", "block3.0.norm2.weight", "block3.0.norm2.bias", "block3.0.mlp.fc1.weight", "block3.0.mlp.fc1.bias", "block3.0.mlp.dwconv.dwconv.weight", "block3.0.mlp.dwconv.dwconv.bias", "block3.0.mlp.fc2.weight", "block3.0.mlp.fc2.bias", "block3.1.norm1.weight", "block3.1.norm1.bias", "block3.1.attn.q.weight", "block3.1.attn.q.bias", "block3.1.attn.kv1.weight", "block3.1.attn.kv1.bias", "block3.1.attn.kv2.weight", "block3.1.attn.kv2.bias", "block3.1.attn.f1.weight", "block3.1.attn.f1.bias", "block3.1.attn.f2.weight", "block3.1.attn.f2.bias", "block3.1.attn.lepe_linear.weight", "block3.1.attn.lepe_linear.bias", "block3.1.attn.lepe_conv.weight", "block3.1.attn.lepe_conv.bias", "block3.1.attn.proj.weight", "block3.1.attn.proj.bias", "block3.1.norm2.weight", "block3.1.norm2.bias", "block3.1.mlp.fc1.weight", "block3.1.mlp.fc1.bias", "block3.1.mlp.dwconv.dwconv.weight", "block3.1.mlp.dwconv.dwconv.bias", "block3.1.mlp.fc2.weight", "block3.1.mlp.fc2.bias", "block3.2.norm1.weight", "block3.2.norm1.bias", "block3.2.attn.sr.weight", "block3.2.attn.sr.bias", "block3.2.attn.norm.weight", "block3.2.attn.norm.bias", "block3.2.attn.q1.weight", "block3.2.attn.q1.bias", "block3.2.attn.kv1.weight", "block3.2.attn.kv1.bias", "block3.2.attn.q2.weight", "block3.2.attn.q2.bias", "block3.2.attn.kv2.weight", "block3.2.attn.kv2.bias", "block3.2.attn.lepe_linear.weight", "block3.2.attn.lepe_linear.bias", "block3.2.attn.lepe_conv.weight", "block3.2.attn.lepe_conv.bias", "block3.2.attn.proj.weight", "block3.2.attn.proj.bias", "block3.2.norm2.weight", "block3.2.norm2.bias", "block3.2.mlp.fc1.weight", "block3.2.mlp.fc1.bias", "block3.2.mlp.dwconv.dwconv.weight", "block3.2.mlp.dwconv.dwconv.bias", "block3.2.mlp.fc2.weight", "block3.2.mlp.fc2.bias", "block3.3.norm1.weight", "block3.3.norm1.bias", "block3.3.attn.q.weight", "block3.3.attn.q.bias", "block3.3.attn.kv1.weight", "block3.3.attn.kv1.bias", "block3.3.attn.kv2.weight", "block3.3.attn.kv2.bias", "block3.3.attn.f1.weight", "block3.3.attn.f1.bias", "block3.3.attn.f2.weight", "block3.3.attn.f2.bias", "block3.3.attn.lepe_linear.weight", "block3.3.attn.lepe_linear.bias", "block3.3.attn.lepe_conv.weight", "block3.3.attn.lepe_conv.bias", "block3.3.attn.proj.weight", "block3.3.attn.proj.bias", "block3.3.norm2.weight", "block3.3.norm2.bias", "block3.3.mlp.fc1.weight", "block3.3.mlp.fc1.bias", "block3.3.mlp.dwconv.dwconv.weight", "block3.3.mlp.dwconv.dwconv.bias", "block3.3.mlp.fc2.weight", "block3.3.mlp.fc2.bias", "block3.4.norm1.weight", "block3.4.norm1.bias", "block3.4.attn.sr.weight", "block3.4.attn.sr.bias", "block3.4.attn.norm.weight", "block3.4.attn.norm.bias", "block3.4.attn.q1.weight", "block3.4.attn.q1.bias", "block3.4.attn.kv1.weight", "block3.4.attn.kv1.bias", "block3.4.attn.q2.weight", "block3.4.attn.q2.bias", "block3.4.attn.kv2.weight", "block3.4.attn.kv2.bias", "block3.4.attn.lepe_linear.weight", "block3.4.attn.lepe_linear.bias", "block3.4.attn.lepe_conv.weight", "block3.4.attn.lepe_conv.bias", "block3.4.attn.proj.weight", "block3.4.attn.proj.bias", "block3.4.norm2.weight", "block3.4.norm2.bias", "block3.4.mlp.fc1.weight", "block3.4.mlp.fc1.bias", "block3.4.mlp.dwconv.dwconv.weight", "block3.4.mlp.dwconv.dwconv.bias", "block3.4.mlp.fc2.weight", "block3.4.mlp.fc2.bias", "block3.5.norm1.weight", "block3.5.norm1.bias", "block3.5.attn.q.weight", "block3.5.attn.q.bias", "block3.5.attn.kv1.weight", "block3.5.attn.kv1.bias", "block3.5.attn.kv2.weight", "block3.5.attn.kv2.bias", "block3.5.attn.f1.weight", "block3.5.attn.f1.bias", "block3.5.attn.f2.weight", "block3.5.attn.f2.bias", "block3.5.attn.lepe_linear.weight", "block3.5.attn.lepe_linear.bias", "block3.5.attn.lepe_conv.weight", "block3.5.attn.lepe_conv.bias", "block3.5.attn.proj.weight", "block3.5.attn.proj.bias", "block3.5.norm2.weight", "block3.5.norm2.bias", "block3.5.mlp.fc1.weight", "block3.5.mlp.fc1.bias", "block3.5.mlp.dwconv.dwconv.weight", "block3.5.mlp.dwconv.dwconv.bias", "block3.5.mlp.fc2.weight", "block3.5.mlp.fc2.bias", "block3.6.norm1.weight", "block3.6.norm1.bias", "block3.6.attn.sr.weight", "block3.6.attn.sr.bias", "block3.6.attn.norm.weight", "block3.6.attn.norm.bias", "block3.6.attn.q1.weight", "block3.6.attn.q1.bias", "block3.6.attn.kv1.weight", "block3.6.attn.kv1.bias", "block3.6.attn.q2.weight", "block3.6.attn.q2.bias", "block3.6.attn.kv2.weight", "block3.6.attn.kv2.bias", "block3.6.attn.lepe_linear.weight", "block3.6.attn.lepe_linear.bias", "block3.6.attn.lepe_conv.weight", "block3.6.attn.lepe_conv.bias", "block3.6.attn.proj.weight", "block3.6.attn.proj.bias", "block3.6.norm2.weight", "block3.6.norm2.bias", "block3.6.mlp.fc1.weight", "block3.6.mlp.fc1.bias", "block3.6.mlp.dwconv.dwconv.weight", "block3.6.mlp.dwconv.dwconv.bias", "block3.6.mlp.fc2.weight", "block3.6.mlp.fc2.bias", "block3.7.norm1.weight", "block3.7.norm1.bias", "block3.7.attn.q.weight", "block3.7.attn.q.bias", "block3.7.attn.kv1.weight", "block3.7.attn.kv1.bias", "block3.7.attn.kv2.weight", "block3.7.attn.kv2.bias", "block3.7.attn.f1.weight", "block3.7.attn.f1.bias", "block3.7.attn.f2.weight", "block3.7.attn.f2.bias", "block3.7.attn.lepe_linear.weight", "block3.7.attn.lepe_linear.bias", "block3.7.attn.lepe_conv.weight", "block3.7.attn.lepe_conv.bias", "block3.7.attn.proj.weight", "block3.7.attn.proj.bias", "block3.7.norm2.weight", "block3.7.norm2.bias", "block3.7.mlp.fc1.weight", "block3.7.mlp.fc1.bias", "block3.7.mlp.dwconv.dwconv.weight", "block3.7.mlp.dwconv.dwconv.bias", "block3.7.mlp.fc2.weight", "block3.7.mlp.fc2.bias", "block3.8.norm1.weight", "block3.8.norm1.bias", "block3.8.attn.sr.weight", "block3.8.attn.sr.bias", "block3.8.attn.norm.weight", "block3.8.attn.norm.bias", "block3.8.attn.q1.weight", "block3.8.attn.q1.bias", "block3.8.attn.kv1.weight", "block3.8.attn.kv1.bias", "block3.8.attn.q2.weight", "block3.8.attn.q2.bias", "block3.8.attn.kv2.weight", "block3.8.attn.kv2.bias", "block3.8.attn.lepe_linear.weight", "block3.8.attn.lepe_linear.bias", "block3.8.attn.lepe_conv.weight", "block3.8.attn.lepe_conv.bias", "block3.8.attn.proj.weight", "block3.8.attn.proj.bias", "block3.8.norm2.weight", "block3.8.norm2.bias", "block3.8.mlp.fc1.weight", "block3.8.mlp.fc1.bias", "block3.8.mlp.dwconv.dwconv.weight", "block3.8.mlp.dwconv.dwconv.bias", "block3.8.mlp.fc2.weight", "block3.8.mlp.fc2.bias", "block3.9.norm1.weight", "block3.9.norm1.bias", "block3.9.attn.q.weight", "block3.9.attn.q.bias", "block3.9.attn.kv1.weight", "block3.9.attn.kv1.bias", "block3.9.attn.kv2.weight", "block3.9.attn.kv2.bias", "block3.9.attn.f1.weight", "block3.9.attn.f1.bias", "block3.9.attn.f2.weight", "block3.9.attn.f2.bias", "block3.9.attn.lepe_linear.weight", "block3.9.attn.lepe_linear.bias", "block3.9.attn.lepe_conv.weight", "block3.9.attn.lepe_conv.bias", "block3.9.attn.proj.weight", "block3.9.attn.proj.bias", "block3.9.norm2.weight", "block3.9.norm2.bias", "block3.9.mlp.fc1.weight", "block3.9.mlp.fc1.bias", "block3.9.mlp.dwconv.dwconv.weight", "block3.9.mlp.dwconv.dwconv.bias", "block3.9.mlp.fc2.weight", "block3.9.mlp.fc2.bias", "block3.10.norm1.weight", "block3.10.norm1.bias", "block3.10.attn.sr.weight", "block3.10.attn.sr.bias", "block3.10.attn.norm.weight", "block3.10.attn.norm.bias", "block3.10.attn.q1.weight", "block3.10.attn.q1.bias", "block3.10.attn.kv1.weight", "block3.10.attn.kv1.bias", "block3.10.attn.q2.weight", "block3.10.attn.q2.bias", "block3.10.attn.kv2.weight", "block3.10.attn.kv2.bias", "block3.10.attn.lepe_linear.weight", "block3.10.attn.lepe_linear.bias", "block3.10.attn.lepe_conv.weight", "block3.10.attn.lepe_conv.bias", "block3.10.attn.proj.weight", "block3.10.attn.proj.bias", "block3.10.norm2.weight", "block3.10.norm2.bias", "block3.10.mlp.fc1.weight", "block3.10.mlp.fc1.bias", "block3.10.mlp.dwconv.dwconv.weight", "block3.10.mlp.dwconv.dwconv.bias", "block3.10.mlp.fc2.weight", "block3.10.mlp.fc2.bias", "block3.11.norm1.weight", "block3.11.norm1.bias", "block3.11.attn.q.weight", "block3.11.attn.q.bias", "block3.11.attn.kv1.weight", "block3.11.attn.kv1.bias", "block3.11.attn.kv2.weight", "block3.11.attn.kv2.bias", "block3.11.attn.f1.weight", "block3.11.attn.f1.bias", "block3.11.attn.f2.weight", "block3.11.attn.f2.bias", "block3.11.attn.lepe_linear.weight", "block3.11.attn.lepe_linear.bias", "block3.11.attn.lepe_conv.weight", "block3.11.attn.lepe_conv.bias", "block3.11.attn.proj.weight", "block3.11.attn.proj.bias", "block3.11.norm2.weight", "block3.11.norm2.bias", "block3.11.mlp.fc1.weight", "block3.11.mlp.fc1.bias", "block3.11.mlp.dwconv.dwconv.weight", "block3.11.mlp.dwconv.dwconv.bias", "block3.11.mlp.fc2.weight", "block3.11.mlp.fc2.bias", "block3.12.norm1.weight", "block3.12.norm1.bias", "block3.12.attn.sr.weight", "block3.12.attn.sr.bias", "block3.12.attn.norm.weight", "block3.12.attn.norm.bias", "block3.12.attn.q1.weight", "block3.12.attn.q1.bias", "block3.12.attn.kv1.weight", "block3.12.attn.kv1.bias", "block3.12.attn.q2.weight", "block3.12.attn.q2.bias", "block3.12.attn.kv2.weight", "block3.12.attn.kv2.bias", "block3.12.attn.lepe_linear.weight", "block3.12.attn.lepe_linear.bias", "block3.12.attn.lepe_conv.weight", "block3.12.attn.lepe_conv.bias", "block3.12.attn.proj.weight", "block3.12.attn.proj.bias", "block3.12.norm2.weight", "block3.12.norm2.bias", "block3.12.mlp.fc1.weight", "block3.12.mlp.fc1.bias", "block3.12.mlp.dwconv.dwconv.weight", "block3.12.mlp.dwconv.dwconv.bias", "block3.12.mlp.fc2.weight", "block3.12.mlp.fc2.bias", "block3.13.norm1.weight", "block3.13.norm1.bias", "block3.13.attn.q.weight", "block3.13.attn.q.bias", "block3.13.attn.kv1.weight", "block3.13.attn.kv1.bias", "block3.13.attn.kv2.weight", "block3.13.attn.kv2.bias", "block3.13.attn.f1.weight", "block3.13.attn.f1.bias", "block3.13.attn.f2.weight", "block3.13.attn.f2.bias", "block3.13.attn.lepe_linear.weight", "block3.13.attn.lepe_linear.bias", "block3.13.attn.lepe_conv.weight", "block3.13.attn.lepe_conv.bias", "block3.13.attn.proj.weight", "block3.13.attn.proj.bias", "block3.13.norm2.weight", "block3.13.norm2.bias", "block3.13.mlp.fc1.weight", "block3.13.mlp.fc1.bias", "block3.13.mlp.dwconv.dwconv.weight", "block3.13.mlp.dwconv.dwconv.bias", "block3.13.mlp.fc2.weight", "block3.13.mlp.fc2.bias", "block3.14.norm1.weight", "block3.14.norm1.bias", "block3.14.attn.sr.weight", "block3.14.attn.sr.bias", "block3.14.attn.norm.weight", "block3.14.attn.norm.bias", "block3.14.attn.q1.weight", "block3.14.attn.q1.bias", "block3.14.attn.kv1.weight", "block3.14.attn.kv1.bias", "block3.14.attn.q2.weight", "block3.14.attn.q2.bias", "block3.14.attn.kv2.weight", "block3.14.attn.kv2.bias", "block3.14.attn.lepe_linear.weight", "block3.14.attn.lepe_linear.bias", "block3.14.attn.lepe_conv.weight", "block3.14.attn.lepe_conv.bias", "block3.14.attn.proj.weight", "block3.14.attn.proj.bias", "block3.14.norm2.weight", "block3.14.norm2.bias", "block3.14.mlp.fc1.weight", "block3.14.mlp.fc1.bias", "block3.14.mlp.dwconv.dwconv.weight", "block3.14.mlp.dwconv.dwconv.bias", "block3.14.mlp.fc2.weight", "block3.14.mlp.fc2.bias", "block3.15.norm1.weight", "block3.15.norm1.bias", "block3.15.attn.q.weight", "block3.15.attn.q.bias", "block3.15.attn.kv1.weight", "block3.15.attn.kv1.bias", "block3.15.attn.kv2.weight", "block3.15.attn.kv2.bias", "block3.15.attn.f1.weight", "block3.15.attn.f1.bias", "block3.15.attn.f2.weight", "block3.15.attn.f2.bias", "block3.15.attn.lepe_linear.weight", "block3.15.attn.lepe_linear.bias", "block3.15.attn.lepe_conv.weight", "block3.15.attn.lepe_conv.bias", "block3.15.attn.proj.weight", "block3.15.attn.proj.bias", "block3.15.norm2.weight", "block3.15.norm2.bias", "block3.15.mlp.fc1.weight", "block3.15.mlp.fc1.bias", "block3.15.mlp.dwconv.dwconv.weight", "block3.15.mlp.dwconv.dwconv.bias", "block3.15.mlp.fc2.weight", "block3.15.mlp.fc2.bias", "norm3.weight", "norm3.bias", "patch_embed4.conv1.c.weight", "patch_embed4.conv1.bn.weight", "patch_embed4.conv1.bn.bias", "patch_embed4.conv2.c.weight", "patch_embed4.conv2.bn.weight", "patch_embed4.conv2.bn.bias", "patch_embed4.conv3.c.weight", "patch_embed4.conv3.bn.weight", "patch_embed4.conv3.bn.bias", "block4.0.norm1.weight", "block4.0.norm1.bias", "block4.0.attn.q.weight", "block4.0.attn.q.bias", "block4.0.attn.kv.weight", "block4.0.attn.kv.bias", "block4.0.attn.lepe_linear.weight", "block4.0.attn.lepe_linear.bias", "block4.0.attn.lepe_conv.weight", "block4.0.attn.lepe_conv.bias", "block4.0.attn.proj.weight", "block4.0.attn.proj.bias", "block4.0.norm2.weight", "block4.0.norm2.bias", "block4.0.mlp.fc1.weight", "block4.0.mlp.fc1.bias", "block4.0.mlp.dwconv.dwconv.weight", "block4.0.mlp.dwconv.dwconv.bias", "block4.0.mlp.fc2.weight", "block4.0.mlp.fc2.bias", "norm4.weight", "norm4.bias", "head.weight", "head.bias". Unexpected key(s) in state_dict: "state_dict_ema".

OliverRensu commented 11 months ago

self.model.load_state_dict(torch.load(model_save_path)['state_dict_ema']) Hi, please note that we take ema, so the parameters is under the key "state_dict_ema"