tensorflow api操纵和管理的是numpy矩阵数据
例子:
1 import tensorflow as tf 2 import numpy as np 3 4 vector_np = np.array([1,2,4]) 5 vector_tf = tf.constant(vector_np) 6 7 with tf.Session() as sess: 8 # print (sess.run(tensor_id.get_shape())) 9 print (sess.run(vector_tf))