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

Choose GPU to use? #2

Open
yl-to opened this issue Jul 24, 2019 · 2 comments
Open

Choose GPU to use? #2

yl-to opened this issue Jul 24, 2019 · 2 comments

Comments

@yl-to
Copy link

yl-to commented Jul 24, 2019

Hi, could I add some code at the beginning of train.py to choose which GPU to use?
Like set the os.environ.

@hiram64
Copy link
Owner

hiram64 commented Jul 25, 2019

As you said, the GPU to use can be set by means of CUDA_VISIBLE_DEVICES environment variable.

e.g.
(Inside script)
os.environ['CUDA_VISIBLE_DEVICES'] = "0"

or

(outside script)
export CUDA_VISIBLE_DEVICES="0"

Later, I will update the code to set GPU by tf.ConfigProto as another option.

@lzzlxxlsz
Copy link

Is cpu ok?

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