Based on the documentation, the default GPU is the one with the lowest id:
If you have more than one GPU in your system, the GPU with the lowest ID will be selected by default.
Is it possible to change this default from command line or one line of code?
CUDA_VISIBLE_DEVICES
env var to make some GPUs invisible to tensorflow – Yaroslav Bulatov Apr 16 '16 at 23:13