【Tensorflow】tensorflow.python.framework.errors_impl.DataLossError: not an sstable(bad magic number)

在使用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

 

你可能感兴趣的:(tensorflow)