November 2017
Intermediate to advanced
274 pages
6h 16m
English
The default graph gets instantiated when the TensorFlow library is imported. Constructing a graph object instead of using the default graph is useful when creating multiple models in one file that do not depend on each other. Constants and operations are added to the graph in TensorFlow.
Variables and operations applied outside of newGraph.as_default() will get added to the default graph, which is created when the library is imported:
newGraph = tf.Graph()with newGraph.as_default(): newGraphConst = tf.constant([2., 3.])
Read now
Unlock full access