KranthiGV / Pretrained-Show-and-Tell-model

This repository contains pretrained Show and Tell: A Neural Image Caption Generator implemented in Tensorflow.
MIT License
198 stars 45 forks source link

How to freeze to frozen.pb #21

Closed monatis closed 6 years ago

monatis commented 6 years ago

I'm trying to freeze 2m iterations checkpoint into a frozen.pb with the following command:

python freeze_graph.py --input_graph=C:/dev/pretrained-show-and-tell-model/extras/graph.pbtxt --input_checkpoint=C:/dev/pretrained-show-and-tell-model/model.ckpt-2000000 --output_graph=C:/dev/im2txt.pb --output_node_names=lstm/initial_state,softmax,lstm/state

freeze_graph.py script gives an error stating that lstm/initial_state is not in the graph, but inference_wrapper.py script fetches from this node. What output nodes should I use to to freeze this checkpoint?