首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行export_inference_graph.py抛出值错误

运行export_inference_graph.py抛出值错误
EN

Stack Overflow用户
提问于 2021-03-10 12:39:35
回答 1查看 81关注 0票数 0

我是StackOverflow.I的新手,我正在尝试使用export_inference_graph.py导出一个模型。我使用faster_rcnn_inception_v2.I am在本地训练我的模型,并遵循这个教程

在命令提示符中输入

代码语言:javascript
复制
python export_inference_graph.py --input_type image_tensor --pipeline_config_path CAPTCHA_training/faster_rcnn_inception_v2_coco.config --trained_checkpoint_prefix "CAPTCHA_training_dir/model.ckpt-51272" --output_directory CAPTCHA_inference_graph 

所有的路径都是正确的,我得到了跟随错误。

代码语言:javascript
复制
  File "export_inference_graph.py", line 206, in <module>
    tf.app.run()
  File "C:\Users\Jatin\anaconda3\lib\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\Jatin\anaconda3\lib\site-packages\absl\app.py", line 303, in run
    _run_main(main, args)
  File "C:\Users\Jatin\anaconda3\lib\site-packages\absl\app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "export_inference_graph.py", line 194, in main
    exporter.export_inference_graph(
  File "C:\Users\Jatin\anaconda3\lib\site-packages\object_detection\exporter.py", line 604, in export_inference_graph
    detection_model = model_builder.build(pipeline_config.model,
  File "C:\Users\Jatin\anaconda3\lib\site-packages\object_detection\builders\model_builder.py", line 1116, in build
    return build_func(getattr(model_config, meta_architecture), is_training,
  File "C:\Users\Jatin\anaconda3\lib\site-packages\object_detection\builders\model_builder.py", line 583, in _build_faster_rcnn_model
    _check_feature_extractor_exists(frcnn_config.feature_extractor.type)
  File "C:\Users\Jatin\anaconda3\lib\site-packages\object_detection\builders\model_builder.py", line 249, in _check_feature_extractor_exists
    raise ValueError('{} is not supported. See `model_builder.py` for features '
ValueError: faster_rcnn_inception_v2 is not supported. See `model_builder.py` for features extractors compatible with different versions of Tensorflow

我正在使用Python3.8.5和tensorflow 2.4.1版本,谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-03-10 13:27:45

根据错误看像是Tensorflow版本的问题。查看源faster_rcnn_inception_v2存在于if tf_version.is_tf1():下。试着用TF 1。

builder.py#L70

extractor.py#L33

faster_rcnn_inception_v2_coco存在于Tensorflow 1检测模型动物园。

models#共同训练的模型

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66564976

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档