Now that we can put objects into our computational graph, we will introduce operations that act on such objects.
Operations in a computational graph
Getting ready
To start a graph, we load TensorFlow and create a session, as follows:
import tensorflow as tf sess = tf.Session()
How to do it...
In this example, we will combine what we have learned and feed each number in a list into an operation in a graph and print the output:
First, we declare our tensors and placeholders. Here, we will create a NumPy array to feed into our operation:
import numpy as np x_vals = np...