Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of checkpoint #8

Open
shinra1012 opened this issue Jul 5, 2021 · 1 comment
Open

Usage of checkpoint #8

shinra1012 opened this issue Jul 5, 2021 · 1 comment

Comments

@shinra1012
Copy link

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
Copy link
Owner

theFoxofSky commented Jul 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants