【发布时间】:2018-11-28 08:47:27
【问题描述】:
我想冻结模型并部署它们。我首先遵循了来自1 和2 的slim 附带的教程,使用InceptionV3,效果很好。然后我尝试对从the provided url 下载的 resnet_v1_50 执行相同的操作。
任何建议将不胜感激!
谢谢!
以下是步骤:
cd /path/to/tensorflow-models/research/slim
# export inference graph, success
python export_inference_graph.py --alsologtostderr --model_name=resnet_v1_50 --output_file=resnet_v1_50_inf_graph.pb
# freeze the inference graph with the trained weights, failed
python ~/.local/lib/python2.7/site-packages/tensorflow/python/tools/freeze_graph.py \
--input_graph=resnet_v1_50_inf_graph.pb \
--input_checkpoint=/path/to/models/resnet_v1_50.ckpt \
--input_binary=true --output_graph=frozen_resnet_v1_50.pb \
--output_node_names=resnet_v1_50/predictions/Reshape
错误消息太长,我重定向一个以引用它here。
【问题讨论】:
标签: python python-2.7 tensorflow tensorflow-serving