Chapter 4
Executing Graphs in Sessions
IN THIS CHAPTER
Creating graphs and accessing their data
Serializing data from a graph into a GraphDef
Creating and launching sessions
Printing messages to the log
Visualizing summary data with TensorBoard
The preceding chapter introduced a plethora of functions that create, transform, and process tensors. Most of these functions return a tensor, and this may lead you to believe that the function performs its operation as soon as it’s called. This is how Python functions usually work, but this is not how TensorFlow functions work.
When an application executes a TensorFlow function that creates, transforms, or processes a tensor, the function doesn’t execute its operation. Instead, it stores its operation in a data structure called a graph. A graph can hold many operations, and they're not executed until the application executes the graph in a session. When a session executes a graph, it performs the graph's operations in order.
The benefit of ...
Get TensorFlow For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.