ubuntu 17.04 下搭建深度学习环境

1.目前使用CPU即可,先不需要显卡配置
2.使用pip3 安装深度学习框架
3.要先安装pip3  #sudo apt install python3-pip  https://blog.csdn.net/bjzhaoxiao/article/details/81270368  https://blog.csdn.net/fengzhen8023/article/details/82927776
4.安装tensorflow #sudo pip3 install tensorflow
5.安装pytorch
#在python3.5下
  1. pip3 install http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp35-cp35m-linux_x86_64.whl
  2. pip3 install torchvision
在下载安装时:系统设置-->软件和更新-->ubuntu 软件-->下载自aliyun  最好
以上都是 基于py3

 

TensorFlow测试程序,如果正常运行,输出 b'hello,tensorf' ,则TensorFlow安装成功。

import tensorflow as tf
hello = tf.constant('hello,tensorf')
sess = tf.Session()
print(sess.run(hello))
————————————————

 

posted on 2019-11-24 18:37  cltt  阅读(171)  评论(0编辑  收藏  举报

导航