标签:ESS 数据 array ops on() frame var lob run
numpy数据转成Tensor小Demoimport numpy as np
import tensorflow as tf
temp_np = np.zeros((3,3))
print(type(temp_np))#<class ‘numpy.ndarray‘>
tensor_temp = tf.convert_to_tensor(temp_np)#<class ‘tensorflow.python.framework.ops.Tensor‘>
print(type(tensor_temp))
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
tensor_var = sess.run(tensor_temp)
print(tensor_var)
标签:ESS 数据 array ops on() frame var lob run
原文地址:https://blog.51cto.com/5669384/2415629