Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Error when converting gpu model to cpu modle #35

Closed
lampts opened this issue Dec 27, 2016 · 4 comments
Closed

Error when converting gpu model to cpu modle #35

lampts opened this issue Dec 27, 2016 · 4 comments

Comments

@lampts
Copy link

lampts commented Dec 27, 2016

I'm trying to convert pretrained model on GPU to CPU: th ./tools/release_model.lua -model pretrained/onmt_baseline_wmt15-all.de-en_epoch13_8.98.t7 -output_model pretrained/onmt-wmt15-cpu.t7

I got the following error:

stack traceback:
[C]: in function 'error'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:343: in function 'readObject'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/Users/laam/torch/install/share/lua/5.1/nn/Module.lua:184: in function 'read'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:351: in function 'readObject'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:353: in function 'readObject'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:368: in function 'readObject'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
...
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:369: in function 'readObject'
/Users/laam/torch/install/share/lua/5.1/torch/File.lua:409: in function 'load'
./tools/release_model.lua:35: in function 'main'
./tools/release_model.lua:52: in main chunk
[C]: in function 'dofile'
...laam/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x0104997d10

How to fix that?

@lampts
Copy link
Author

lampts commented Dec 27, 2016

I couldn't load this pretrained onmt_baseline_wmt15-all.de-en_epoch13_8.98.t7 on GPU instance as well. Could you help to load it correctly?

@lampts
Copy link
Author

lampts commented Dec 27, 2016

I figured out to solve it by adding gpuid 1 for my case.

@lampts lampts closed this as completed Dec 27, 2016
@srush
Copy link
Contributor

srush commented Dec 27, 2016

Thanks for the issue. I'm going to reopen, as we should fail with a more natural error.

@guillaumekln
Copy link
Collaborator

Additionally, we should certainly release pre-trained models for the CPU before making them available.

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

No branches or pull requests

3 participants