2017年12月29日 星期五

TensorFlow not runing by GPU?

Problem

     You're sure you install the GPU version of TensorFlow by:
pip install tensorflow-gpu
However, you find that the calculation is extremely slow and your CPU loading is pretty high.

Solution

    This might because of the environment variable that controls which graphic cards should be used:  The CUDA_VISIBLE_DEVICES should be equal to 0 if you have only one GPU.  In my case, I have downloaded a deep learning project that has assigned this variable to empty string (CUDA_VISIBLE_DEVICES = "") result in the project is running on CPU.

沒有留言:

張貼留言