Purpose Of Multiple Graphs In Tensorflow

来源:互联网 发布:unity3d怎么导入场景 编辑:程序博客网 时间:2024/06/02 04:45

why tensorflow designed to programming with multiple graphs

ID simple detailed 1 give user more control with over naming A tf.Graph defines the namespace for tf.Operation objects: each operation in a single graph must have a unique name. TensorFlow will “uniquify” the names of operations by appending “_1”, “_2”, and so on to their names if the requested name is already taken. Using multiple explicitly created graphs gives you more control over what name is given to each operation. 2 simplify the construction of large graph The default graph stores information about every tf.Operation and tf.Tensor that was ever added to it. If your program creates a large number of unconnected subgraphs, it may be more efficient to use a different tf.Graph to build each subgraph, so that unrelated state can be garbage collected.

reference

Graphs and Sessions  |  TensorFlow
https://www.tensorflow.org/programmers_guide/graphs

阅读全文
0 0
原创粉丝点击