您的位置:首页 > 其它

深度学习学习笔记(一):pytorch及tensorflow2.0安装

2020-01-14 19:11 525 查看

先检查环境,看一看电脑cuda的版本(windows参考https://www.jianshu.com/p/d3b9419a0f89,ubuntu参考https://blog.csdn.net/qq_16525279/article/details/80662217
安装cuda及cudnnhttps://zhuanlan.zhihu.com/p/65557545

pytorch

一、登陆pytorch官网:

https://pytorch.org/get-started/locally/

二、使用pip安装:

直接复制上图中的pip3 install …,然后将pip3改为pip

三、测试是否可用:

import torch
print(torch.__version__)
print(torch.cuda.is_available())
> '1.2.0'
> True

tensorflow2

一、安装

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

二、检测是否可用

import tensorflow as tf
print(tf.__version__)
> '2.0.0-beta1'
print(tf.test.gpu_device_name())

输出如图:

  • 点赞
  • 收藏
  • 分享
  • 文章举报
qq_16066781 发布了3 篇原创文章 · 获赞 0 · 访问量 75 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: