ddfnet icon indicating copy to clipboard operation
ddfnet copied to clipboard

Usage of checkpoint

Open shinra1012 opened this issue 3 years ago • 1 comments

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.

shinra1012 avatar Jul 05 '21 10:07 shinra1012

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.

theFoxofSky avatar Jul 05 '21 11:07 theFoxofSky