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

Unable to extract m-25012018-123527.pth.tar #7

Open
Gambitier opened this issue Mar 10, 2018 · 2 comments · May be fixed by #21
Open

Unable to extract m-25012018-123527.pth.tar #7

Gambitier opened this issue Mar 10, 2018 · 2 comments · May be fixed by #21

Comments

@Gambitier
Copy link

hi, I am trying to extract m-25012018-123527.pth.tar, but while doing so error occurred. I have tried it on both windows and ubuntu.

@zoogzog
Copy link
Owner

zoogzog commented Mar 13, 2018

I don't think you are supposed to extract the model file at all. I am not even sure it is a tar archive at all, yet that is how networks are saved in various examples. For example: imagenet (line 267), mnist (line 62).

Here is the documentation about saving/loading networks.

In my code, I can load the saved model to continue training as presented below, where checkpoint is the path to the tar file.

modelCheckpoint = torch.load(checkpoint)
model.load_state_dict(modelCheckpoint['state_dict'])
optimizer.load_state_dict(modelCheckpoint['optimizer'])

@hyattbaker
Copy link

Had the same question thanks @zoogzog

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

Successfully merging a pull request may close this issue.

3 participants