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

第一步:安装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)

作者: dawei

【声明】:永州站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部