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

CPU support for pre-trained models. Working fine without issue. #19

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

deshwalmahesh
Copy link

Hi,
There was a line where it was directly written as .cuda() to push the structure to GPU. I have changes it to .to(device).

Since the models were trained with cuda GPUs and saved with nn.DataParallel, they are not able to load in CPU. I have change just a couple of lines such as allocating the map_location where ever necessary. Also, just for the pre-trained models, which most of the users will be loading, I have added one more condition that loads the models and gives results smoothly. Please let me know if I could do some other changes.

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 this pull request may close these issues.

None yet

1 participant