theFoxofSky / ddfnet

The official implementation of the CVPR2021 paper: Decoupled Dynamic Filter Networks
MIT License
214 stars 34 forks source link

Usage of checkpoint #8

Open shinra1012 opened 3 years ago

shinra1012 commented 3 years ago

I downloaded the pretrained model , ddf_add_resnet50.pth.tar and ddf_mul_resnet50.pth.tar. ddf_model ├── ddf_add_resnet50.pth.tar ├──ddf_mul_resnet50.pth.tar I use load_checkpoint like create_model( 'ddf_mul_resnet50', checkpoint_path='./ddf_mul_resnet50/ddf_mul_resnet50.pth.tar', pretrained=True, num_classes=None, in_chans=3, global_pool=None, scriptable='torchscript') but I get warning No pretrained weights exist for this model. Using random initialization.

The warning exists even if I use load_checkpoint function like author.

theFoxofSky commented 3 years ago

Please check your downloaded files. You can use the following python code to print them:

import torch
model = torch.load('./ddf_mul_resnet50/ddf_mul_resnet50.pth.tar')
print(model)

If everything is fine, you will see the 'state dict' of the model. Otherwise, please redownload the file.