Closed bobo0810 closed 4 years ago
I rechecked our pre-trained model and code , it is no problem. you could recheck your modification and run commands.
I got it!
I only watched eca_resnet.py
The default content of eca_resnet.py
is eca_resnet152(k_size=[3,3,3,3])
eca_resnet152_k3357.pth.tar
means eca_resnet152(k_size=[3,3,5,7])
When I load the pre-trained model with default parameters, an error will occur.
size mismatch for layer3.0.eca.conv.weight: copying a param with shape torch.Size([1, 1, 5]) from checkpoint, the shape in current model is torch.Size([1, 1, 3]).
Can be solved by the following code in line200:k_size=[3, 3, 3, 3]
changed tok_size=[3, 3, 5, 7]