import tensorflow as tf
a = tf.constant([1.0, 2.0], name = 'a')
b = tf.constant([2.0, 3.0], name = 'b')
result = a + b
print (a)
print (b)
print (result)
sess = tf.Session()
sess.run(result)
print (result)
时间: 2024-09-22 00:47:25
import tensorflow as tf
a = tf.constant([1.0, 2.0], name = 'a')
b = tf.constant([2.0, 3.0], name = 'b')
result = a + b
print (a)
print (b)
print (result)
sess = tf.Session()
sess.run(result)
print (result)