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

How to load pickle file #8

Closed
cryptedp opened this issue Apr 8, 2018 · 2 comments
Closed

How to load pickle file #8

cryptedp opened this issue Apr 8, 2018 · 2 comments

Comments

@cryptedp
Copy link

cryptedp commented Apr 8, 2018

Since I am trying to use the pretrained weights for a different dataset, I am trying to understand how to change the very last layer. However when I try to read the pickle file with only pickle.load() it only returns a integer. When I try to read the pickle file sequentially, it says that A load persistent id instruction was encountered,
but no persistent_load function was specified.

Since I don't know how the pickle file was generated, can you tell me how to read the pickle file in python, so I know what I can modify for my purposes ?

@DavideA
Copy link
Owner

DavideA commented Apr 12, 2018

Hi!
Can you please detail a little bit your needs?

You should never read the pickle file yourself, use torch.load instead.
Than you can act on the state_dict if you want to load weights for specific layers.

D

@DavideA
Copy link
Owner

DavideA commented Oct 3, 2018

Closing.

@DavideA DavideA closed this as completed Oct 3, 2018
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