运行model_main_tf2.py和exporter_main_v2.py后,不会导出模型不知道为什么吗

问题描述

我正在使用Google colab中的TensorFlow对象检测API进行对象检测。这是我的目录结构。

object_detection/
  training/
  exported_model/
  pipeline.config
  model_main_tf2.py
  exporter_main_v2.py

我在下面跑步训练。

!python model_main_tf2.py --model_dir=training --pipeline_config_path=pipeline.config

我在下面波纹管中导出模型。

!python exporter_main_v2.py
--input_type image_tensor
--pipeline_config_pathpipeline.config
--trained_checkpoint_dir培训/
--output_directoryexported_model

以上所有内容均不会产生任何错误,但是在运行了两者之后,在我的案例(exported_model)中无法在所需目录中看到导出的模型。我不明白怎么了?

解决方法

我发现在进行培训时,即使它没有产生任何错误,也没有成功。因为它没有生成应在成功训练后生成的文件(如检查点)。 training/目录为空。

this文件的文档帮助我弄清楚了我的问题。您可以检查它以获得进一步的指导。

,

我使用export_tflite_graph_tf2.py遵循struction