ubuntu14.04系统中安装tensorflow(cpu版)

第一步:安装pip工具

sudo apt-get install python-pip python-dev

第二步:安装tensorflow-cpu版

#安装cpu版0.9.0版本
sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
#安装cpu版0.5.0版本:
sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
#安装gpu版0.9.0
sudo pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
#安装gpu版0.5.0版本:
sudo pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

第三步:打开sublime-text3 使用SFTP连接ubuntu系统出现如下错误

The SSH host key has changed. This could indicate a potential security breach, or that the domain you are connecting to recently moved servers.
If you are confident this is not a security breach you can delete the old host key and try again.
 1. Win XP: Start > Run > regedit.exe
    Win Vista/7: Start > regedit
 2. Expand to HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys and delete the entry including @22:10.0.83.202
打开windows7下按以上步骤打开并删除相应记录

第四步:linux上测试tensor测试文件

test.py
import numpy
import tensorflow as tf
hello = tf.constant("hello,tensorflow")
sess = tf.Session()
print sess.run(hello)
a = tf.constant(10)
b = tf.constant(20)
print sess.run(a+b)
linux安装anaconda2 下载地址:https://repo.continuum.io/archive/index.html  安装到/usr/local/anaconda2中
或者指令:sudo apt-get install python-dev 软件后在安装numpy   指令:sudo apt-get install python-numpy
tensorflow的安装目录:/usr/local/lib/python2.7/dist-packages/tensorflow
mnist的数据集下载地址为: http://yann.lecun.com/exdb/mnist/
train-images-idx3-ubyte.gz:  training set images (9912422 bytes) 
train-labels-idx1-ubyte.gz:  training set labels (28881 bytes) 
t10k-images-idx3-ubyte.gz:   test set images (1648877 bytes) 
t10k-labels-idx1-ubyte.gz:   test set labels (4542 bytes)





  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值