Res2Net / Res2Net-maskrcnn

Res2Net for Instance segmentation and Object detection using MaskRCNN
https://mmcheng.net/res2net/
MIT License
55 stars 18 forks source link

size mismatch for backbone.body.layer 4.2.conv3.weight: #1

Closed RLiBIn closed 3 years ago

RLiBIn commented 4 years ago

size mismatch for backbone.body.layer4.2.conv3.weight: copying a param with shape torch.Size([2048, 896, 1, 1]) from checkpoint, the shape in current model is torch.Size([2048, 512, 1, 1]). I use res2net-maskrcnn,Cannot run with the above error. MODEL: META_ARCHITECTURE: "GeneralizedRCNN" WEIGHT: "https://shanghuagao.oss-cn-beijing.aliyuncs.com/res2net/res2net50_14w_8s-6527dddc.pth" BACKBONE: CONV_BODY: "R-50-FPN" RESNETS:

gasvn commented 4 years ago

Use the configs of res2net, not resnet. https://github.com/Res2Net/Res2Net-maskrcnn/blob/master/configs/pytorch_mask_rcnn_R2_50_s4_FPN_2x.yaml ex: BACKBONE: CONV_BODY: "R2-50-FPN" RESNETS: BACKBONE_OUT_CHANNELS: 256 WIDTH_PER_GROUP: 26 SCALE: 4 TRANS_FUNC: "Bottle2neckWithFixedBatchNorm"

RLiBIn commented 4 years ago

With your help, I understand my problem. The problem is the part I modified myself. There is a problem with the location. Thank you very much and hope you have a happy life.