ZJCV / RotNet

Image rotation correction based on DeepLearning
Apache License 2.0
21 stars 7 forks source link

When I use the model I trained, I get an error. Is this related to the number of channels? #6

Closed ho-adam closed 2 years ago

ho-adam commented 2 years ago

size mismatch for backbone.first_stem.0.weight: copying a param with shape torch.Size([16, 1, 3, 3]) from checkpoint, the shape in current model is torch.Size([16, 3, 3, 3]).

zjykzj commented 2 years ago

size mismatch for backbone.first_stem.0.weight: copying a param with shape torch.Size([16, 1, 3, 3]) from checkpoint, the shape in current model is torch.Size([16, 3, 3, 3]).

Give me more info. Did you mean weights/model.pth? How many input channels have you set for the training model?

ho-adam commented 2 years ago

I trained according to the dataset and pre-model you provided. After the model is generated, using demo.py get an error.

zjykzj commented 2 years ago

I trained according to the dataset and pre-model you provided. After the model is generated, using demo.py get an error.

wowo, the file in configs/mbv3_small_se_hsigmoid_fmnist_224_e100.yaml has 3 channels inputs setting

  BACKBONE:
    NAME: 'MobileNetV3'
    ARCH: 'mobilenetv3-small'
    IN_PLANES: 3  

the file demo/mbv3_small_se_hsigmoid_fmnist_224_e100.yaml has 1 channels inputs setting

  BACKBONE:
    NAME: 'MobileNetV3'
    ARCH: 'mobilenetv3-small'
    IN_PLANES: 1

and the pretrained weight weights/model.pth has 1 channels inputs setting

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.