Tensorflow Java Multi-GPU inference
问题 I have a server with multiple GPUs and want to make full use of them during model inference inside a java app. By default tensorflow seizes all available GPUs, but uses only the first one. I can think of three options to overcome this issue: Restrict device visibility on process level, namely using CUDA_VISIBLE_DEVICES environment variable. That would require me to run several instances of the java app and distribute traffic among them. Not that tempting idea. Launch several sessions inside a