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 make the code run default on GPU? #22

Open
aasharma90 opened this issue Jun 10, 2020 · 3 comments
Open

How to make the code run default on GPU? #22

aasharma90 opened this issue Jun 10, 2020 · 3 comments

Comments

@aasharma90
Copy link

Hi @Skylion007

I'm observing that the default trainer function SeparateGANTrainer is running on CPU, which is quite slow. Is there a way to run it on multi-GPU?

Although, I see that you've provided GPU supported trainers such as MultiGPUGANTrainer, but I'm wondering why these functions do not support the 2:1 training strategy you are using in SeparateGANTrainer. Is there a wayout?

Also, please let me know if I'm misunderstanding anything. Thanks!

@Skylion007
Copy link
Contributor

Skylion007 commented Jun 10, 2020

SeperateGANTrainer should only really be used on GPU. Tensorpack/Tensorflow will always default to the GPU. Did you make sure you installed the proper gpu enabled version of Tensorflow? In fact, I am surprised it doesn't error when trying to run it on CPU.

@aasharma90
Copy link
Author

I also thought so, but running the code, I found it to be running on CPU by default. I tried it with 1.14.0 version of both tensorflow and tensorflow-gpu, and 0.8.9 version of tensorpack.

@Skylion007
Copy link
Contributor

Skylion007 commented Jun 11, 2020 via email

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