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

PyTorch: check point support #401

Closed
tensorbuffer opened this issue Dec 24, 2019 · 8 comments
Closed

PyTorch: check point support #401

tensorbuffer opened this issue Dec 24, 2019 · 8 comments
Labels

Comments

@tensorbuffer
Copy link

Hello, when I try to use the web version to load pytorch checkpoint file, I got this error: Error loading PyTorch model. File does not contain root module or state dictionary in 'checkpoint.pth'.
The checkpoint is saved as:
checkpoint = {
'model': model_without_ddp.state_dict(),
'optimizer': optimizer.state_dict(),
'lr_scheduler': lr_scheduler.state_dict(),
'epoch': epoch,
'args': args}
torch.save(
checkpoint, path_to_file)

This is pytorch standard way of saving checkpoint:
https://pytorch.org/tutorials/beginner/saving_loading_models.html#saving-loading-a-general-checkpoint-for-inference-and-or-resuming-training

@lutzroeder
Copy link
Owner

lutzroeder commented Dec 25, 2019

Can you share the model file?

@tensorbuffer
Copy link
Author

@lutzroeder
Copy link
Owner

lutzroeder commented Dec 25, 2019

features.1.skip_add.observer.scale tensor is null.

lutzroeder added a commit that referenced this issue Dec 25, 2019
Repository owner deleted a comment from tensorbuffer Dec 25, 2019
@tensorbuffer
Copy link
Author

great, thanks! I can load the checkpoint file.
However all that's shown are 'Module' blocks, there's no connection between them. Is this the right visualization?

@abhigoku10
Copy link

@tensorbuffer @lutzroeder @demid5111 @scottcjt i am also facing the same issues not able to visualize any connection between the modules , any idea how to obtain the connections ??

@tensorbuffer
Copy link
Author

I think this is because pytorch graph is dynamic, the graph is generated on the fly, so you have to feed an input and execute the model to get the graph.

@simphide
Copy link

Hi, I also have this problem with the models of this project: https://github.com/BloodAxe/Kaggle-2020-Alaska2/releases

Does anybody have an idea how I can see the connections etc.? Thank you!

@lutzroeder
Copy link
Owner

lutzroeder commented Jul 18, 2021

@simphide the files include only training weights. See #720.

@lutzroeder lutzroeder changed the title pytorch check point support PyTorch: check point support Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants