Keras.NET icon indicating copy to clipboard operation
Keras.NET copied to clipboard

How to select specific GPU for Model Prediction?

Open thefillture opened this issue 3 years ago • 3 comments

Hi, I have a computer with 4 GPU installed , however , I would like to select only 1 specific GPU to do model prediction using keras.NET. How can I go about doing this ? Like example , using only GPU 2 to do model prediction , while the rest of the GPU can do other stuff.

thefillture avatar Mar 30 '22 02:03 thefillture

Hello, if you want to select ur gpu u need to set the environement variable "CUDA_VISIBLE_DEVICES" at 0, 1 or -1 for your cpu (U need to set this variable before starting keras)

CorentinPtrl avatar Mar 31 '22 20:03 CorentinPtrl

Oh, Thanks for the reply. But does it hard code all my applications to be only using that GPU? Can I do it in such a way where different applications can use different GPU?

thefillture avatar Apr 01 '22 01:04 thefillture

No it will not apply for the other applications if you just set it in one app

CorentinPtrl avatar Apr 05 '22 09:04 CorentinPtrl

Stale issue message

github-actions[bot] avatar May 03 '23 00:05 github-actions[bot]