Search code examples
pythontensorflowdeep-learningtensorboard

Tensorflow: how to view checkpoint in tensorboard?


Suppose I have checkpoint with content:

checkpoint
├── model.ckpt-240000.data-00000-of-00001
├── model.ckpt-240000.index
└── model.ckpt-240000.meta

Is it possible to view content of checkpoint in tensorboard or it only possible converting to .pb format?


Solution

  • Looks like it can be done like:

    import tensorflow as tf
    
    g = tf.Graph()
    
    with g.as_default() as g:
        tf.train.import_meta_graph('./checkpoint/model.ckpt-240000.meta')
    
    with tf.Session(graph=g) as sess:
        file_writer = tf.summary.FileWriter(logdir='checkpoint_log_dir/faceboxes', graph=g)
    

    And then tensorboard --logdir checkpoint_log_dir/faceboxes/