服务器 linux anaconda 安装GPU版本tensorflow,keras,pytorch

1.建环境

conda create --name ly1 python=3.6
source activate ly1  #激活环境
source deactivate  #退出环境

2.安装GPU版本tensorflow

pip install tensorflow-gpu=1.3.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

3.安装keras

pip install keras

4.安装pytorch(torchvision)

pip install torch-0.2.0.post3-cp36-cp36m-manylinux1_x86_64.whl
pip install torchvision

安装完成后,测试安装是否成功

python
import tensorflow
tensorflow.__version__#查看tensorflow版本

猜你喜欢

转载自blog.csdn.net/qq_40088702/article/details/84937220
今日推荐