tensorflow how print out the value of the tensor

tensor_1 = tf.constant([x for x in range(1,10)])

with tf.Session() as sess:
    print(tensor_1.eval())

The print results: [123456789]

Guess you like

Origin blog.csdn.net/u_7890/article/details/88688131