tensor_1 = tf.constant([x for x in range(1,10)])
with tf.Session() as sess:
print(tensor_1.eval())
print的结果:[1 2 3 4 5 6 7 8 9]
tensor_1 = tf.constant([x for x in range(1,10)])
with tf.Session() as sess:
print(tensor_1.eval())
print的结果:[1 2 3 4 5 6 7 8 9]