Save Tensorflow graph for viewing in Tensorboard without summary operations

后端 未结 5 2264
南旧
南旧 2021-01-01 17:55

I have a rather complicated Tensorflow graph that I\'d like to visualize for optimization purposes. Is there a function that I can call that will simply save the graph for v

5条回答
  •  醉酒成梦
    2021-01-01 18:21

    This worked for me:

    graph = tf.Graph()
    with graph.as_default():
        ... build graph (without annotations) ...
    writer = tf.summary.FileWriter(logdir='logdir', graph=graph)
    writer.flush()
    

    The graph is loaded automatically when launching tensorboard with "--logdir=logdir/". No "upload" button needed.

提交回复
热议问题