Skip to content

Instantly share code, notes, and snippets.

@qijiexu
qijiexu / Git Cheatsheet.md
Last active March 23, 2018 05:18 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@qijiexu
qijiexu / README.md
Created March 23, 2018 05:17 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@qijiexu
qijiexu / pb_viewer.py
Created March 4, 2018 01:14 — forked from nithishdivakar/pb_viewer.py
Load .pb into Tensorboard
import tensorflow as tf
from tensorflow.python.platform import gfile
with tf.Session() as sess:
model_filename ='path/to/pb/file'
with gfile.FastGFile(model_filename, 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
g_in = tf.import_graph_def(graph_def)
LOGDIR="./"
train_writer = tf.summary.FileWriter(LOGDIR)
import tensorflow as tf
import argparse
# command line arguments
parser = argparse.ArgumentParser(
description='Convert a checkpoint to frozen graph')
parser.add_argument(
'--checkpoint',
type=str,