【发布时间】:2018-10-26 01:02:05
【问题描述】:
我通过将research/slim/nets/mobilenet/mobilenet_v2.py 的tensorflow/models 存储库中的expansion_size 从6 更改为4,创建了MobileNetV2 特征提取器架构的自定义变体。
我希望能够使用 model_main.py 脚本训练 SSD + Mobilenet_v2(进行此更改)模型,如对象检测 API 的 running_locally tutorial 中所述。
当我这样做时,我看到以下错误,这是有道理的:
`InvalidArgumentError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint.
解决这个问题:
- 我从
pipeline.config中删除了finetune_checkpoint规范。 - 我在
object_detection/model_hparams.py中将load_pretrained=True更改为load_pretrained=False。 - 我将
--hparams_overrides='load_pretrained=false'作为命令行输入参数添加到model_main.py。
尽管如此,我仍然看到同样的错误。
为什么 tensorflow 仍在尝试恢复检查点。我怎样才能让它不这样做?
【问题讨论】:
标签: python tensorflow object-detection-api