tensorflow / tensorflow/models

RuntimeError: tf.placeholder() is not compatible with eager execution .

Open
#10,031 2 comments 0 reactions 3 assignees View on GitHub

Nobody has claimed this yet.

models:research:odapi type:bug
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

Prerequisites

I am using Tensorflow 2.5 in python 3.8.
I am trying to get the frozen_grpah.pb file by running following command
!python Tensorflow\models\research\object_detection\export_inference_graph.py --input_type=image_tensor --pipeline_config_path=Tensorflow\workspace\models\my_ssd_mobnet\pipeline.config --trained_checkpoint_prefix=Tensorflow\workspace\models\my_ssd_mobnet\ckpt-11.data-00000-of-00001 --output_directory=Tensorflow\workspace\models\my_ssd_mobnet\export

I got the following issue
Traceback (most recent call last):
File "Tensorflow\models\research\object_detection\export_inference_graph.py", line 206, in
tf.app.run()
File "C:\Users\priyabrata\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\platform\app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "C:\Users\priyabrata\anaconda3\envs\tensorflow_gpu\lib\site-packages\absl\app.py", line 303, in run
_run_main(main, args)
File "C:\Users\priyabrata\anaconda3\envs\tensorflow_gpu\lib\site-packages\absl\app.py", line 251, in _run_main
sys.exit(main(argv))
File "Tensorflow\models\research\object_detection\export_inference_graph.py", line 194, in main
exporter.export_inference_graph(
File "C:\Users\priyabrata\anaconda3\envs\tensorflow_gpu\lib\site-packages\object_detection-0.1-py3.8.egg\object_detection\exporter.py", line 611, in export_inference_graph
_export_inference_graph(
File "C:\Users\priyabrata\anaconda3\envs\tensorflow_gpu\lib\site-packages\object_detection-0.1-py3.8.egg\object_detection\exporter.py", line 503, in _export_inference_graph
outputs, placeholder_tensor_dict = build_detection_graph(
File "C:\Users\priyabrata\anaconda3\envs\tensorflow_gpu\lib\site-packages\object_detection-0.1-py3.8.egg\object_detection\exporter.py", line 457, in build_detection_graph
placeholder_tensor, input_tensors = input_placeholder_fn_map[input_type](
File "C:\Users\priyabrata\anaconda3\envs\tensorflow_gpu\lib\site-packages\object_detection-0.1-py3.8.egg\object_detection\exporter.py", line 186, in _image_tensor_input_placeholder
input_tensor = tf.placeholder(
File "C:\Users\priyabrata\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\ops\array_ops.py", line 3268, in placeholder
raise RuntimeError("tf.placeholder() is not compatible with "
RuntimeError: tf.placeholder() is not compatible with eager execution.

I also checked the exporter.py ,but couldn't fix the issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.