Step 0: Uninstall protobuf

pip uninstall protobuf

Step 1: Uninstall tensorflow

pip uninstall tensorflow
pip uninstall tensorflow-gpu

Step 2: Force reinstall Tensorflow with GPU support

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

export CUDA_VISIBLE_DEVICES=0,1

windows

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/豆瓣源加速>