Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Different behaviour of Keras 2.0.9 and 2.0.8 #8353
With PIP installation of Keras, when using 2.0.9 (latest as of now), when importing Keras with tf backend, it allocates all available GPU resources immediately after import - however, in 2.0.8, the GPU allocation was not happening immediately after importing Keras. Is this an expected behaviour in 2.0.9?
I encounter the same problem
attempts to allocates the GPU resources. Not sure it is an expected behavior
referenced this issue
Nov 3, 2017
The problem is that the
Reproducing the problem is tricky as you need also more than 1 GPU. Here is a pure TF example which shows the problem:
As we see it has registered only GPU1. The results can be confirmed using nvidia-smi:
On the same Python shell let's call the method to get the list of available GPUs:
Ooops! It just registered both GPUs! Let's confirm with nvidia-smi:
As we see the process has acquired also the GPU0 and it's using all the available resources.