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

Error when loading from a saved checkpoint file #25

Open
PlumedSerpent opened this issue Dec 2, 2019 · 1 comment
Open

Error when loading from a saved checkpoint file #25

PlumedSerpent opened this issue Dec 2, 2019 · 1 comment
Labels
invalid This doesn't seem right

Comments

@PlumedSerpent
Copy link

Hi, I have a training script with structure as :
model=Net()
flops, params = get_model_complexity_info(model, (3, 256, 256), as_strings=True, print_per_layer_stat=True)
print('Flops: ' + flops)
print('Params: ' + params)
training
torch.save(model)
Then when I tried to load from above saved checkpoint using torch.load('checkpoint.pth'), it occurs into an error:
AttributeError: 'Net' object has no attribute 'start_flops_count'.
Do you have any idea why I get this error and how can i solve it?

@sovrasov
Copy link
Owner

sovrasov commented Dec 3, 2019

Hi! Please take a look to the pytorch guidelines for saving models: https://pytorch.org/docs/stable/notes/serialization.html#recommend-saving-models

@sovrasov sovrasov added the invalid This doesn't seem right label May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants