python
import tensorflow as tf
tensor = tf.constant([[1, 2, 3], [4, 5, 6]])
python
python
python
import tensorflow as tf
graph = tf.Graph()
with graph.as_default():
input_tensor = tf.constant([1, 2, 3])
add_tensor = tf.add(input_tensor, 1)
square_tensor = tf.square(add_tensor)
output_tensor = tf.reduce_sum(square_tensor)
with tf.Session(graph=graph) as sess:
result = sess.run(output_tensor)