Tensorflow_PersonLab icon indicating copy to clipboard operation
Tensorflow_PersonLab copied to clipboard

ouput_node_names to convert the model into .pb format

Open rohith-nagamalla opened this issue 5 years ago • 1 comments

Hi, Thank you for the implementation of the personaLab. I am trying to convert the model to .pb format so that I can use it for tensorflowjs. But it requires a parameter named as 'output_node_names'. So it could be helpful if someone could tell me what should be given as input to that parameter for this model.

rohith-nagamalla avatar Jan 22 '21 17:01 rohith-nagamalla

import tensorflow as tf

Load the graph definition from the .meta file

with tf.Session() as sess: saver = tf.train.import_meta_graph('model/personlab/model.ckpt.meta')

# Retrieve the default computation graph
graph_def = tf.get_default_graph().as_graph_def()

# Save the graph definition to disk
tf.io.write_graph(graph_def, 'logdir', 'graph.pb', as_text=False)

srivatsavagade avatar Apr 30 '23 08:04 srivatsavagade