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

Specify which GPU to use #20

Closed
Yuliang-Zou opened this issue Nov 10, 2016 · 3 comments
Closed

Specify which GPU to use #20

Yuliang-Zou opened this issue Nov 10, 2016 · 3 comments

Comments

@Yuliang-Zou
Copy link

I noticed that in ./tools/train_net.py, although you have variable device_name to get gpu id from command line, you do not actually use it. That means this model can only be trained on the default gpu?

I am not familiar with Tensorflow. So I wonder how I can specify which gpu to use, or even use cpu.

@ICapalija
Copy link
Contributor

ICapalija commented Nov 14, 2016

This code uses GPU:0 as default.
To specify which GPU to use you can modify the code or hide some GPUs to tensorflow.
The easiest way is to hide GPUs with environment variable CUDA_VISIBLE_DEVICES
(e.g. if you want to run code on GPU:1 then run "export CUDA_VISIBLE_DEVICE=1" before you run Faster-RCNN code)

@Yuliang-Zou
Copy link
Author

@ICapalija Thank you! So what if I don't have a GPU? Can this code run on CPU as well?

@ahmedammar
Copy link
Contributor

@Yuliang-Zou have a look at #28

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