版权声明:本文为博主原创文章,未经作者允许请勿转载。 https://blog.csdn.net/heiheiya https://blog.csdn.net/heiheiya/article/details/89214015
在使用tensorflow的模型固化工具freeze.graph.py
python temsorflow/python/tools/freeze_graph.py \
--input_graph=graph.pb \
--input_checkpoint=model.ckpt.data-00000-of-00001 \
--output_graph=freeze_graph.pb \
--output_node_name=logits/BiasAdd
时,报如下错误:
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file model.ckpt.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
这个错误是因为--input_checkpoint的名字搞错了,后面的.data-00000-of-00001不应该写。
改正之后
python temsorflow/python/tools/freeze_graph.py \
--input_graph=graph.pb \
--input_checkpoint=model.ckpt \
--output_graph=freeze_graph.pb \
--output_node_name=logits/BiasAdd