Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

EOFError when using cPickle.load() #20

Open
wangxy524 opened this issue May 18, 2018 · 3 comments
Open

EOFError when using cPickle.load() #20

wangxy524 opened this issue May 18, 2018 · 3 comments

Comments

@wangxy524
Copy link

When I tried to use the converted model like "model.ckpt-init" or "model.ckpt-pretrained", I met the following error:
Traceback (most recent call last):
File "/home/wxy/Proj/test.py", line 21, in
model = DeepLFOV(weights_path)
......
File "/home/wxy/Proj/test.py", line 53, in _create_variable
weights = cPickle.load(f) # load pre-trained weights
EOFError

@DrSleep
Copy link
Owner

DrSleep commented May 18, 2018

make sure that the file is not corrupted; try to load it in a separate script and check its contents first

@wangxy524
Copy link
Author

I have tried several times in a separate script using two computer, but I still got the EOFError,
And when I used the "vim" command to edit the file, I see [incomplete last line] [converted]. So I add a line break into the file, it still didn't work.

@DrSleep
Copy link
Owner

DrSleep commented May 19, 2018

Sorry for misleading you - the docs have not been updated in a while: there are two ways of restoring weights, one is via the weights_path and another via restore_from. The weights_path loads the file using the pickle mechanism (after converting the weigths from Caffe), while restore_from uses the inner TensorFlow format. Now, the files that are provided are already in the TensorFlow format, so you do not need to pass the weights_path variable at all, just restore_from.

Let me know if you have any more questions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants