Hi, I am trying to train my own model using Inception architecture using inception_train.py after completion of training I got the following files
/home/rakashi/Desktop/Tagging/flowernet_train/checkpoint
/home/rakashi/Desktop/Tagging/flowernet_train/events.out.tfevents.1501927375.pavan
/home/rakashi/Desktop/Tagging/flowernet_train/model.ckpt-0.data-00000-of-00001
/home/rakashi/Desktop/Tagging/flowernet_train/model.ckpt-0.index
/home/rakashi/Desktop/Tagging/flowernet_train/model.ckpt-0.meta
/home/rakashi/Desktop/Tagging/flowernet_train/model.ckpt-9.data-00000-of-00001
/home/rakashi/Desktop/Tagging/flowernet_train/model.ckpt-9.index
/home/rakashi/Desktop/Tagging/flowernet_train/model.ckpt-9.meta
I have converted these files into below format by using exportgraph.py in python tensorflow tools
/home/rakashi/Desktop/Tagging/flowernet_export/00004999/checkpoint
/home/rakashi/Desktop/Tagging/flowernet_export/00004999/export.data-00000-of-00001
/home/rakashi/Desktop/Tagging/flowernet_export/00004999/export.index
/home/rakashi/Desktop/Tagging/flowernet_export/00004999/export.meta
But I want to convert these files into .pb and .pbtxt files, I tried with the following command
python freeze_graph.py --input_graph=/home/rakashi/Desktop/Tagging/flowernet_train/graph.pbtxt --input_checkpoint=/home/rakashi/Desktop/Tagging/flowernet_export/00004999/export.data-00000-of-00001 --output_graph=/tmp/frozen_graph.pb --output_node_names=softmax
I am getting error like this
reader = pywrap_tensorflow.NewCheckpointReader(input_checkpoint)
File "/home/rakashi/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 110, in NewCheckpointReader
return CheckpointReader(compat.as_bytes(filepattern), status)
File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
self.gen.next()
File "/home/rakashi/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file /home/rakashi/Desktop/Tagging/flowernet_export/00004999/export.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?
Please help me..... how can I use my model to test my own image.... like inceptionV3 model on imagenet
This question is better asked on StackOverflow since it is not a bug or feature request. There is also a larger community that reads questions there. Thanks!
I also meet this problem,when I use the script:
python object_detection/export_inference_graph.py --input_type image_tensor --pipeline_config_path ../for_tf/ssd_inception_v2_coco.config --trained_checkpoint_prefix ../for_tf/in --output_directory ../for_tf/out
the same question appear.
But I fix it by changing the script like this:
python object_detection/export_inference_graph.py --input_type image_tensor --pipeline_config_path ../for_tf/ssd_inception_v2_coco.config --trained_checkpoint_prefix ../for_tf/in/model.ckpt-68344 --output_directory ../for_tf/out
Be attention to the path of trained_checkpoint_prefix!!!
@coolKeen it works for me, thanks :)
Most helpful comment
I also meet this problem,when I use the script:
python object_detection/export_inference_graph.py --input_type image_tensor --pipeline_config_path ../for_tf/ssd_inception_v2_coco.config --trained_checkpoint_prefix ../for_tf/in --output_directory ../for_tf/out
the same question appear.
But I fix it by changing the script like this:
python object_detection/export_inference_graph.py --input_type image_tensor --pipeline_config_path ../for_tf/ssd_inception_v2_coco.config --trained_checkpoint_prefix ../for_tf/in/model.ckpt-68344 --output_directory ../for_tf/out
Be attention to the path of trained_checkpoint_prefix!!!