张量(Tensor)
可以理解为数组,0阶标量,1阶向量,n阶数组。可以通过前边的[查看阶数。
如:[[[ ]]]为3阶。
计算图(Graph)
搭建神经网络的计算过程,是承载一个或者多个计算节点的一张图,只搭建网络,不运算。
会话(Session)
执行计算图中的节点运算。
示例
import tensorflow as tf
x=tf.constant([[1.0,2.0]])
w=tf.constant([[3.0],[4.0]])
y=tf.matmul(x,w)
print y
with tf.Session() as sess:
print sess.run(y)