-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 do you convert a model trained on GPU to be used for inferencing on CPU? #957
Comments
You don't need to convert it - it works out of the box. |
That's what I thought, however when I specified cpu using this command: I got this error: "RuntimeError: Expected object of backend CUDA but got backend CPU for argument #3 'index'" |
Normally it should work out of the box, but there are some embedding types that we import for which this functionality does not work. Notably, that's the embeddings we get from the |
Ahh, that makes sense, I am using elmo embeddings |
Yeah unfortunately this is a known problem, see #635. Perhaps the fix in that thread will work for you? I hope we can fix this at some point. |
If the model is torch based you can convert the model to ONXX model , then you can further optimize it |
Hi, I am trying to use to a model I trained on a server that had cuda GPUs on CPU only; are there any library functions I can use to pull this off? Thanks in advance
The text was updated successfully, but these errors were encountered: