This is related to How to enable Keras with Theano to utilize multiple GPUs but instead of using multiple GPUs, I'm interested in specifying which GPU the specific model trains or runs on.
My nvidia-smi
output looks as follows:
+------------------------------------------------------+
| NVIDIA-SMI 361.42 Driver Version: 361.42 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla K80 Off | 0000:03:00.0 Off | 0 |
| N/A 38C P0 60W / 149W | 11354MiB / 11519MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 Tesla K80 Off | 0000:04:00.0 Off | 0 |
| N/A 37C P0 71W / 149W | 224MiB / 11519MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 2 GeForce GTX 750 Ti Off | 0000:06:00.0 On | N/A |
| 40% 29C P8 1W / 38W | 120MiB / 2047MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
This output is of course when nothing is running. The issue is I'm not sure in Keras how to specify which GPU to run on. Of course, with TensorFlow we can just do the with tf.device('/cpu:1'):
paradigm, but I am not sure how that would integrate with Keras.
Thanks!