tensorflow GPU版安装问题

Step 0: Uninstall protobuf

1
pip uninstall protobuf

Step 1: Uninstall tensorflow

1
2
pip uninstall tensorflow
pip uninstall tensorflow-gpu

Step 2: Force reinstall Tensorflow with GPU support

1
pip install --upgrade --force-reinstall tensorflow-gpu

Step 3: If you haven’t already, set CUDA_VISIBLE_DEVICES

So for me with 2 GPUs it would be

1
export CUDA_VISIBLE_DEVICES=0,1

windows

1
C:/Users/dlink/AppData/Local/Programs/Python/Python35/python.exe -m pip install tensorflow-gpu -i https://pypi.douban.com/simple/

国内安装时可用-i https://pypi.douban.com/simple/豆瓣源加速

当前网速较慢或者你使用的浏览器不支持博客特定功能,请尝试刷新或换用Chrome、Firefox等现代浏览器