飞翔鸟

人生无止境,奋斗不息

tensorflow 的数据管理

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))

 

posted @ 2018-07-10 11:48  飞翔—鸟  阅读(165)  评论(0编辑  收藏  举报