I have two GPUs, and I just would like to use one GPU to train a network by tensorflow. When I train it, the code use all the memories of two GPUs, but only one GPU is working:
I do not know why and how to solve this problem.
I have two GPUs, and I just would like to use one GPU to train a network by tensorflow. When I train it, the code use all the memories of two GPUs, but only one GPU is working:
I do not know why and how to solve this problem.
By default tensorflow will occupy consume the memory of all available GPUs. You can either set allow growth as per @sygi's answer or make only one of the GPUs visible to tensorflow as per Yaroslav's comment. And as per this question.