Open OfirKedem opened 6 years ago
If you want to use the trained model, I think the quickest solution would be to use the older version of the DenseNet implementation.
I met the same problem. Have you solved it? @OfirKedem
Yes i have. You need to roll back torch and torchvision. Use this versions:
Spent some time trying to find torch v0.3.1 for windows. bad luck. It is not available anymore. So pretrained weights are not usable.
This happend is because the high version pytorch define model keys as convX. or normX., but in the low version pytorch define model keys as conv.X. or norm.X., they are defference, so you should define keys as the same name.
Hi zoogzog I've been trying to run your code but it seems the DenseNet121 module has been changed. meaning your parameters are saved under the name: module.densenet121.features.denseblock1.denselayer1.norm.1.bias ------------------------------------------------------------------------------------^---------- while the module is telling me it's missing: module.densenet121.features.denseblock1.denselayer1.norm1.bias
i believe that little dot there is messing everything up... do you have an idea how to solve it? loading an old DenseNet121 module or perhaps updating the parameters names?
i think retraining the model can fix it but I'm trying to save time and avoid training for now.
thanks in advance, a very desperate student :)