Se resnext101 size mismatch
Hi i get a size mismatch issue for se resnext 101 32 x4d I changed the classes to 1 from 1000.
size mismatch, m1: [80 x 8192], m2: [2048 x 1] at /opt/conda/conda-bld/pytorch_1556653099582/work/aten/src/THC/generic/THCTensorMathBlas.cu:268
Probably shape of your input differs from (3, 224, 224). As far as I understand, In implementation of SENet 2D average pooling is used (not global average pooling) https://github.com/Cadene/pretrained-models.pytorch/blob/021d97897c9aa76ec759deff43d341c4fd45d7ba/pretrainedmodels/models/senet.py#L323 That's why the mismatch happens in case of images of different shape. You may change self.avg_pool attribute to nn.AdaptiveAvgPool2d((1, 1)) and it probably should work.