因此,在对云进行培训之后,我尝试使用以下链接导出推理图:
我使用的代码是:
python export_inference_graph.py \--input_type image_tensor \--pipeline_config_path samples/configs/ssd_mobilenet_v1_pets \--trained_checkpoint_prefix training\model.ckpt-29809 \--output_directory crop_graph1它抛出一个错误:
C:\Users\kannan\Desktop\深度学习Projects\GCP\models\research\object_detection>python export_inference_graph.py --输入_类型image_tensor --管道_配置_路径示例/output/ssd_mobilenet_v1_pets-训练有素的_检查点前缀培训\most.last 29809-output_目录crop_graph1回溯(最近一次调用): 文件"export_inference_graph.py",第119行,tf.app.run() File "C:\Users\kannan\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\platform\flags.py",第41行,run flags_passthrough = f._parse_flags(args=args) File“C:\Users\kannan\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\platform\flags.py”,第45行,在"C:\Users\kannan\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\platform\flags.py",self._assert_all_required() _parse_flags self._assert_all_required第78行中,在_assert_all_required self._assert_required(flag_name)文件第74行中,在_assert_required AttributeError中(必须指定标志-%s) AttributeError:标志-输出_目录必须指定。
知道怎么绕过这件事吗?
发布于 2017-12-28 07:31:09
我认为这个问题是由以下几点引起的
\--trained_checkpoint_prefix training\model.ckpt-29809 \--output_directory crop_graph1这个training\model.ckpt-29809应该有一个双引号,如
"training\model.ckpt-29809"我猜想python是在ckpt和29809之间处理额外的"-“,或者可能删除反斜杠,因为它意味着连续的命令。
命令应该在一行中,而不是"\“
python export_inference_graph.py --input_type image_tensor --pipeline_config_path samples/configs/ssd_mobilenet_v1_pets --trained_checkpoint_prefix "training\model.ckpt-29809" --output_directory crop_graph1https://stackoverflow.com/questions/48003394
复制相似问题