A TensorFlow computation, represented as a dataflow graph.
A Graph contains a set of tf.Operation objects, which represent units of computation; and tf.Tensor objects, which represent the units of data that flow between operations.
定义:Tensoflow里计算的一种,表现为数据流图。一个数据流图包含一系列表现为计算单元的op对象,以及表现为在op之间流动的数据单元tensor对象。
当Tensorflow库被加载后,会自动创建一个默认的数据流图,任何没有指定数据流图的op,tensor都会被自动放置在默认的数据流图中。
# 获取默认数据流图的句柄
import tensorflow as tf
default_graph = tf.get_default_graph()
# 创建一个数据流图:
import tensorflow