(1)安装:
$ sudo pip install –upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
假设linux和python IDE已经安装好了,如果没有请参考:
http://www.leiphone.com/news/201606/ORlQ7uK3TIW8xVGF.html
(2)基本的一些操作
#basic operations
from __future__ import print_function
import tensorflow as tf
#constant
a=tf.constant(2)
b=tf.constant(3)
with tf.Session() as sess:
print ("add a and b is %i " % sess.run(tf.add(a,b)))
#placeholder
a1=tf.placeholder(tf.int16)
b1=tf.placeholder(tf.int16)
add1=tf.mul(a1,b1)
with tf.Session() as sess:
print ('a1 mul b1 is %i' %sess.run(add1,feed_dict={a1:4,b1:2}))
#matrix
mat1=tf.constant([[3.0,2.0],[3.0,7.0]])
mat2=tf.constant([[4.0],[3.0]])
product=tf.matmul(mat1,mat2)
with tf.Session() as sess:
print (sess.run(product))
(3)关键算法1—卷积神经网络CNN
(4)关键算法2—world2vector
(5)关键算法3—RNN
(6)