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

Convert .pytorch model to .ckpt? #15

Closed
deama opened this issue Jan 4, 2019 · 7 comments
Closed

Convert .pytorch model to .ckpt? #15

deama opened this issue Jan 4, 2019 · 7 comments

Comments

@deama
Copy link

deama commented Jan 4, 2019

I was wondering if there is a .ckpt version available of the "SepConv - L_F" model, or perhaps if there is a way to convert the .pytorch model to a .ckpt one?

@avinashpaliwal
Copy link
Owner

.ckpt is just an extension used to save the model, you can use .pth as well. I think as long as the checkpoint was created using the torch.save(), you can load it back using torch.load().

@deama
Copy link
Author

deama commented Jan 5, 2019

So if I change "network-lf.pytorch" to "network-lf.ckpt" it should work?

@avinashpaliwal
Copy link
Owner

There is no need to rename the file. Looking at his code here, you can load the checkpoint like this:

model.load_state_dict(torch.load('checkpointName.pytorch'))

@deama
Copy link
Author

deama commented Jan 5, 2019

Sorry, where do I put that?

@avinashpaliwal
Copy link
Owner

@sniklaus @deama Are you trying to run the SepConv CNN? Then just follow the usage instructions provided on the project page.

@sniklaus
Copy link
Contributor

sniklaus commented Jan 5, 2019

It looks like @deama is trying to load the SepConv weights into the Super Slo-Mo model. I am afraid that this is not possible, they are two different methods that are not compatible with each other. If you want to run SepConv, then I concur with @avinashpaliwal that you will have to follow the instructions in the SepConv repository: https://github.com/sniklaus/pytorch-sepconv

@deama
Copy link
Author

deama commented Jan 5, 2019

Hmm, I see.

@deama deama closed this as completed Jan 5, 2019
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

3 participants