Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to generate inference graph from model checkpoint #6717

Closed
Hashirroshan opened this issue May 5, 2019 · 3 comments
Closed

unable to generate inference graph from model checkpoint #6717

Hashirroshan opened this issue May 5, 2019 · 3 comments

Comments

@Hashirroshan
Copy link

I'm using ssd_mobilenet_v2_coco for my custom data training. I completed the training process after 10000 iterations and I got model checkpoint-10000. after that, I tried to generate an interference graph using /tensorflow/models/research/object_detection/export_inference_graph.py using this command python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/ssd_inception_v2_coco.config --trained_checkpoint_prefix training/model.ckpt-10000 --output_directory trained-inference-graphs/output_inference_graph_v1.pb
 but I got following error

(zero) pi@pi-HP-280-G1-MT:~/tf/training_demo$ python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/pipeline_cocco.config --trained_checkpoint_prefix training/model.ckpt --output_directory trained-inference-graphs/output_inference_graph_v1.pb
Traceback (most recent call last):
  File "export_inference_graph.py", line 156, in <module>
    tf.app.run()
  File "/home/pi/.virtualenvs/zero/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 125, in run
    _sys.exit(main(argv))
  File "export_inference_graph.py", line 140, in main
    text_format.Merge(f.read(), pipeline_config)
  File "/home/pi/.virtualenvs/zero/lib/python3.5/site-packages/google/protobuf/text_format.py", line 574, in Merge
    descriptor_pool=descriptor_pool)
  File "/home/pi/.virtualenvs/zero/lib/python3.5/site-packages/google/protobuf/text_format.py", line 631, in MergeLines
    return parser.MergeLines(lines, message)
  File "/home/pi/.virtualenvs/zero/lib/python3.5/site-packages/google/protobuf/text_format.py", line 654, in MergeLines
    self._ParseOrMerge(lines, message)
  File "/home/pi/.virtualenvs/zero/lib/python3.5/site-packages/google/protobuf/text_format.py", line 676, in _ParseOrMerge
    self._MergeField(tokenizer, message)
  File "/home/pi/.virtualenvs/zero/lib/python3.5/site-packages/google/protobuf/text_format.py", line 801, in _MergeField
    merger(tokenizer, message, field)
  File ["/home/pi/.virtualenvs/zero/lib/python3.5/site-packages/google/protobuf/text_format.py",](url) line 875, in _MergeMessageField
    self._MergeField(tokenizer, sub_message)
  File "/home/pi/.virtualenvs/zero/lib/python3.5/site-packages/google/protobuf/text_format.py", line 801, in _MergeField
    merger(tokenizer, message, field)
  File "/home/pi/.virtualenvs/zero/lib/python3.5/site-packages/google/protobuf/text_format.py", line 875, in _MergeMessageField
    self._MergeField(tokenizer, sub_message)
  File "/home/pi/.virtualenvs/zero/lib/python3.5/site-packages/google/protobuf/text_format.py", line 801, in _MergeField
    merger(tokenizer, message, field)
  File "/home/pi/.virtualenvs/zero/lib/python3.5/site-packages/google/protobuf/text_format.py", line 875, in _MergeMessageField
    self._MergeField(tokenizer, sub_message)
  File "/home/pi/.virtualenvs/zero/lib/python3.5/site-packages/google/protobuf/text_format.py", line 768, in _MergeField
    (message_descriptor.full_name, name))
google.protobuf.text_format.ParseError: 35:7 : Message type "object_detection.protos.SsdFeatureExtractor" has no field named "batch_norm_trainable".

------------------------

### System information
- **What is the top-level directory of the model you are using**:
- **Have I written custom code (as opposed to using a stock example script provided in TensorFlow)**:
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**:ubuntu 16.04
- **TensorFlow installed from (source or binary)**:
- **TensorFlow version (use command below)**:1.10.0
- **Bazel version (if compiling from source)**:
- **CUDA/cuDNN version**:9.0
- **GPU model and memory**:GT 730
- **Exact command to reproduce**:

You can collect some of this information using our environment capture script:

https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh

You can obtain the TensorFlow version with

`python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"`

### Describe the problem
Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.

### Source code / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.

@dhkwon1122
Copy link

hi, @Hashirroshan
Did you solve the problem? I got same with you

@7wdeepin
Copy link

Search batch_norm_trainable: true in your pipeline.config, then remove the line.

@tensorflowbutler
Copy link
Member

Hi There,
We are checking to see if you still need help on this, as this seems to be an old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing.
If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants