Error when using export_inference_graph: TypeError: export_inference_graph() got an unexpected keyword argument 'use_side_inputs'

Error when using export_inference_graph: TypeError: export_inference_graph() got an unexpected keyword argument 'use_side_inputs'

我目前正在训练对象检测模型。一切顺利,直到我想导出图表。

当我运行命令

python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/faster_rcnn_inception_v2_coco.config --trained_checkpoint_prefix training/model.ckpt-1606 --output_directory new_graph

我收到以下错误:

Traceback (most recent call last):

File "export_inference_graph.py", line 206, in <module>
    tf.app.run()

  File "C:\Users\dm\Anaconda3\envs\py37\lib\site-packages\tensorflow_core\python\platform\app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)

  File "C:\Users\dm\Anaconda3\envs\py37\lib\site-packages\absl\app.py", line 303, in run
    _run_main(main, args)

  File "C:\Users\dm\Anaconda3\envs\py37\lib\site-packages\absl\app.py", line 251, in _run_main
    sys.exit(main(argv))

  File "export_inference_graph.py", line 202, in main
    side_input_types=side_input_types)

TypeError: export_inference_graph() got an unexpected keyword argument 'use_side_inputs'

有谁知道我在这一步做错了什么?我正在使用 Python Python 3.7 以使用 Tensorflow 1.15.4。这非常令人困惑,因为我正在按照教程进行操作,并且直到这一点为止一切都很好。如果有人知道如何解决这个问题,我将不胜感激!

看起来像你的issue

I somehow managed to get passed it. I'm thinking that the files we have are not compatible anymore. Some are updated while some are not. So I downloaded a very old version of the export_inference_graph.py from here:

https://github.com/datitran/object_detector_app/blob/master/object_detection/g3doc/exporting_models.md

And here are the codes to type instead:

python export_inference_graph.py --input_type image_tensor
--pipeline_config_path training/faster_rcnn_inception_v2_coco.config 
--checkpoint_path training/model.ckpt-1606
--inference_graph_path output_inference_graph.pb