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