Search code examples
tensorflowtensorboard

Graph using tensorboard


How can see the graph, generated by TensorFlow using Tensorboard? Can anyone provide a simple example? I am very new to tensorflow. I am using python as well.

Thanks in advance!!


Solution

  • You need to create a tf.summary.FileWriter that writes your graph to a TensorBoard log. For instance:

    summary_writer = tf.summary.FileWriter('logs', graph=tf.get_default_graph())
    summary_writer.flush()
    

    And then launch tensorboard with the appropriate --logdir parameter.