Tensorflow Keras Do Not Use All Available Resources
Solution 1:
I don't have a GPU on windows, but I got a really good deal installing the Intel Distribution of Python with Anaconda: https://software.intel.com/en-us/articles/using-intel-distribution-for-python-with-anaconda.
For tensorflow, the best seems to be a python 3.5 environment (in the previous link, use python=3.5
)
I then installed tensorflow with pip
inside this environment made with anaconda. Follow installing with anaconda.
Then Keras with conda install keras
. (But make sure it won't replace previous numpy and other installations, find proper installation commands not to replace these optimal packages). Maybe pip install keras
could be better in case the conda version doesn't work. (Again, use the proper options not to replace your existing packages) - Don't let this keras installation replace your numpy packages or your tensorflow packages!
This gave me all processors absolutely 100% (according to windows resource monitor)
If this doesn't solve your problem, you can also try getting the numpy and scipy packages from here. Unfortunately I had no success at all with the keras and tensorflow packages from this source, but numpy is quality stuff.
With GPU, your problem may be the lack of a proper CUDA driver and the CUDNN library? Follow this and this.
Unfortunatelly these things vary a lot from computer to computer. I followed strictly the instructions in these sites, and in tensorflow site, for a linux machine, and the results were astonishing.
Solution 2:
On top of Daniel's answer (check CUDA & cuDNN) - it is never a good idea to have both tensorflow
and tensorflow-gpu
packages installed side by side; most probably, you are using the tensorflow
(i.e. the CPU) one.
To avoid this, you should uninstall both packages, and then re-install tensorflow-gpu
, i.e.:
pip uninstall tensorflow tensorflow-gpu
pip install tensorflow-gpu
See also accepted answer (and comment) here, on a similar issue.
Post a Comment for "Tensorflow Keras Do Not Use All Available Resources"