Can Tensorflow be installed alongside Theano?

删除回忆录丶 提交于 2019-12-25 04:30:16

问题


I'm trying to install tensorflow alongside Theano on a Nvidia Tesla K80. I'm working with Cuda 7.5 and following the instructions given here Theano by itself works well, but as soon as I install tensorflow from source code following the instructions OR using pip install, nvidia-smi as well as Theano stops working.

More specifically, nvidia-smi hangs indefinitely whereas Theano just refuses to run in GPU mode.

I'm also using the latest version of cudnn v4. Does Tensorflow have known issues with respect to causing nvidia-smi to hang and being non-compatible with Theano?


回答1:


TensorFlow pick all the avaible GPU. So if you start it before Theano, Theano won't have any GPUs available by default. If you start Theano first, TensorFlow will segfault when it can't get the GPU Theano use.

To work around that, make the NVIDIA driver only show to TensorFlow the device that you want him to see with this environment variable:

CUDA_VISIBLE_DEVICES=0 python ...


来源:https://stackoverflow.com/questions/36264514/can-tensorflow-be-installed-alongside-theano

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!