Force GPU Selection in TensorFlow

Abhay Shukla
Feb 13, 2021

--

If you want only some GPU’s to be available to TensorFlow, you can configure it using CUDA_VISIBLE_DEVICES environment variable in python.

Here is the code snippet

Note that, for multiple GPU’s you need to specify them in a comma separated string.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Abhay Shukla
Abhay Shukla

Written by Abhay Shukla

Data Science @ Meesho, Ex- Airtel, Swiggy, [24]7.ai https://www.linkedin.com/in/shuklaabhay/ #DataScience #ML #AI #Statistics #Reading #Music #Running

No responses yet

Write a response