Writes a graph proto on disk:
将图模型写入pb文件
tf.train.write_graph(graph_def, logdir, name, as_text=True)
v = tf.Variable(0, name='my_variable')
sess = tf.Session()
tf.train.write_graph(sess.graph_def, '/tmp/my-model', 'train.pbtxt')
**Args:
graph_def: A GraphDef protocol buffer.
logdir : Directory where to write the graph.
name : Filename for the graph.
as_text : If True, writes the graph as an ASCII proto.
**