Open guangdafan opened 3 years ago
@guangdafan Simply use this in your bottleneck block to make it work:
if self.planes == 64:
self.eca = eca_layer(k_size = 3)
elif self.planes == 128:
self.eca = eca_layer(k_size = 5)
elif self.planes == 256:
self.eca = eca_layer(k_size = 5)
elif self.planes == 512:
self.eca = eca_layer(k_size = 7)
@guangdafan For context you can visit my reproduced ECANets here - https://github.com/digantamisra98/Reproducibilty-Challenge-ECANET
Hi,
i have tried to load_state_dict from eca_resnet50_k3557.pth.tar file and has already rename the keys, but meets a RuntimeError: Error(s) in loading state_dict for ResNet: size mismatch for layer2.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]). size mismatch for layer2.1.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]). just like this, from layer2 to layer4
Could you please let me know how to solve this?
Thanks!
hi, how can i use eca_resnet50_k3557.pth.tar in the windows? .tar file cannot be decompressed!
hi, how can i use eca_resnet50_k3557.pth.tar in the windows? .tar file cannot be decompressed! You don't need to decompress it. Use it directly!
hi, how can i use eca_resnet50_k3557.pth.tar in the windows? .tar file cannot be decompressed! You don't need to decompress it. Use it directly!
thanks!
Hi,
i have tried to load_state_dict from eca_resnet50_k3557.pth.tar file and has already rename the keys, but meets a RuntimeError: Error(s) in loading state_dict for ResNet:
size mismatch for layer2.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]). size mismatch for layer2.1.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]). just like this, from layer2 to layer4
Could you please let me know how to solve this?
Thanks!