You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @tcies Thanks for your great works!
I want to use your pretrained model in libtensorflow, because I need to use c++ api. I convert your checkpoint files to pb model file using freeze_graph.py scipts, but the pb model can not use in libtensorflow , because I found the pb files only left 1 opts (vgg16_netvlad_pca/WPCA/kernel). my code are as follows:
with tf.Session() as sess:
saver.restore(sess, input_checkpoint)
output_graph_def = graph_util.convert_variables_to_constants(
sess=sess,
input_graph_def=sess.graph_def,
output_node_names=output_node_names.split(","))
with tf.gfile.GFile(output_graph, "wb") as f:
f.write(output_graph_def.SerializeToString())
print("%d ops in the final graph." % len(output_graph_def.node))
if name == "main":
input_checkpoint='netvlad/vd16_pitts30k_conv5_3_vlad_preL2_intra_white'
out_pb_path="./frozen_model.pb"
freeze_graph(input_checkpoint,out_pb_path)
any suggestions?
thanks!
The text was updated successfully, but these errors were encountered:
Hi @tcies Thanks for your great works!
I want to use your pretrained model in libtensorflow, because I need to use c++ api. I convert your checkpoint files to pb model file using freeze_graph.py scipts, but the pb model can not use in libtensorflow , because I found the pb files only left 1 opts (vgg16_netvlad_pca/WPCA/kernel). my code are as follows:
def freeze_graph(input_checkpoint,output_graph):
output_node_names = "vgg16_netvlad_pca/WPCA/kernel"
saver = tf.train.import_meta_graph(input_checkpoint + '.meta', clear_devices=True)
if name == "main":
input_checkpoint='netvlad/vd16_pitts30k_conv5_3_vlad_preL2_intra_white'
out_pb_path="./frozen_model.pb"
freeze_graph(input_checkpoint,out_pb_path)
any suggestions?
thanks!
The text was updated successfully, but these errors were encountered: