Created
September 18, 2017 19:31
-
-
Save mmatiaschek/73f3a3741fc1676b7b51a887855c375a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create pb and pbtxt from data,index and meta | |
import tensorflow as tf | |
import tensorflow.contrib.slim as slim | |
print("imported Tensorflow") | |
tf.train.import_meta_graph('mpii-single-resnet-101.meta') | |
print("imported meta graph") | |
variables_to_restore = slim.get_variables_to_restore(include=["resnet_v1"]) | |
restorer = tf.train.Saver(variables_to_restore) | |
saver = tf.train.Saver(max_to_keep=5) | |
tf.train.write_graph(sess.graph_def, './', 'graph.pbtxt') | |
tf.train.write_graph(sess.graph_def, './', 'graph.pb', as_text=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment