注意事项:
(1)tensorflow最好使用conda安装:
conda install tensorflow-gpu=2.0.0
conda可以帮忙协调cuda和cudnn,自己用pip安装维护太麻烦了。
(2)tensorflow-gpu与cuda,cudnn版本的对应关系
版本 | cuDNN、CUDA |
---|---|
tensorflow-2.1.0 | 7.6、10.1 |
tensorflow-2.0.0 | 7.4、10.0 |
(3)安装pytorch
pip install torch==1.4.0+cu100 torchvision==0.5.0+cu100 -f https://download.pytorch.org/whl/torch_stable.html