Closed XiaoHao-Chen closed 4 years ago
Have you tried to run 'python res2net.py' directly? Or you can share with me an example code, so I can check where the problem is.
https://github.com/Res2Net/Res2Net-PretrainedModels/issues/5#issuecomment-590436928 maybe this solution can help you.
#5 (comment) maybe this solution can help you.
I try to solve this problem, but the same mistake will occur.
It seems that torch0.4.1 is a little different with torch0.4.0. You can upgrade from torch0.4.0 to torch0.4.1 or higher version to solve this problem. ref: https://discuss.pytorch.org/t/solved-unexpected-key-s-in-state-dict-batches-tracked/23884
When I run 'python res2net.py' directly,the same issue will occur. I will try to upgrade the pytorch. Thank you for your prompt reply.
Updating the version of pytorch can solve the problem. Thank you.
Thank you for your excellent work. Just like issue 5, I ran into the same problem and added "strict = False" to the solution you gave, but the problem still hasn't been solved and the same error still occurs. I tried to load res2net-50-26w-4s. Look forward to your reply. cuda:8.0 python:3.6 pytorch:0.4.0 torchvision:0.1.18