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

Does not use GPU support on Colab #8

Open
SK124 opened this issue Oct 4, 2020 · 5 comments
Open

Does not use GPU support on Colab #8

SK124 opened this issue Oct 4, 2020 · 5 comments

Comments

@SK124
Copy link

SK124 commented Oct 4, 2020

The model is not at all utilising the GPU support Google colab offers. Any changes I should make to the code and in which line would be helpful.
@atong01

@atong01
Copy link
Member

atong01 commented Oct 4, 2020

By default it is set up to use a gpu if available. Please check that one is available with torch.cuda.isavailable(). There is a --gpu flag for specifying gpu and a --use_cpu for the obvious.

@SK124
Copy link
Author

SK124 commented Oct 14, 2020

Thanks I will look into that btw, i noticed a comment which specified that few operations might require torch<1.5 is that resolved?

@atong01
Copy link
Member

atong01 commented Oct 14, 2020

Things were broken in pytorch 1.4 specifically for the density regularization on GPU anything 1.5 and up should be fine.

@SK124
Copy link
Author

SK124 commented Oct 14, 2020

Is there any way i can start training from a checkpoint rather than start from scratch. which line of code should I change?

@atong01
Copy link
Member

atong01 commented Oct 14, 2020

you should be able to load weights from a checkpoint like this, maybe inserting this around line 450 in main.py (and obviously with a correct path) would do the trick

state_dict = torch.load(args.save + "/checkpt.pth", map_location=device)
model.load_state_dict(state_dict["state_dict"])

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