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

How to activate GPU training? #150

Open
usama-muneer opened this issue Jun 3, 2023 · 2 comments
Open

How to activate GPU training? #150

usama-muneer opened this issue Jun 3, 2023 · 2 comments

Comments

@usama-muneer
Copy link

I tried to find out the GPU training setting. Can you share the code snippet where can I set the GPU for training and testing?

@moh3enrafiei
Copy link

you should be better use google colab and active GPU runtime easily

@AniketP04
Copy link

This is the code snippet:

def get_device():

    return torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')

I hope this will solve resolve your issues.

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

3 participants