-
Notifications
You must be signed in to change notification settings - Fork 111
Description
在test.py中,使用百度云上的pth权重时:
parser.add_argument("--sam_checkpoint", type=str, default="/home/Medical/other_models/SAM-Med2D-main/sam-med2d_b.pth", help="sam checkpoint")
显示权重不匹配:
size mismatch for image_encoder.pos_embed: copying a param with shape torch.Size([1, 16, 16, 768]) from checkpoint, the shape in current model is torch.Size([1, 32, 32, 768]).
size mismatch for image_encoder.blocks.2.attn.rel_pos_h: copying a param with shape torch.Size([31, 64]) from checkpoint, the shape in current model is torch.Size([63, 64]).
size mismatch for image_encoder.blocks.2.attn.rel_pos_w: copying a param with shape torch.Size([31, 64]) from checkpoint, the shape in current model is torch.Size([63, 64]).
size mismatch for image_encoder.blocks.5.attn.rel_pos_h: copying a param with shape torch.Size([31, 64]) from checkpoint, the shape in current model is torch.Size([63, 64]).
size mismatch for image_encoder.blocks.5.attn.rel_pos_w: copying a param with shape torch.Size([31, 64]) from checkpoint, the shape in current model is torch.Size([63, 64]).
size mismatch for image_encoder.blocks.8.attn.rel_pos_h: copying a param with shape torch.Size([31, 64]) from checkpoint, the shape in current model is torch.Size([63, 64]).
size mismatch for image_encoder.blocks.8.attn.rel_pos_w: copying a param with shape torch.Size([31, 64]) from checkpoint, the shape in current model is torch.Size([63, 64]).
size mismatch for image_encoder.blocks.11.attn.rel_pos_h: copying a param with shape torch.Size([31, 64]) from checkpoint, the shape in current model is torch.Size([63, 64]).
size mismatch for image_encoder.blocks.11.attn.rel_pos_w: copying a param with shape torch.Size([31, 64]) from checkpoint, the shape in current model is torch.Size([63, 64]).
请问这里如何解决,是哪里的参数设置有问题吗?