无法在对象检测训练中加载finetune_checkpoint



我正在学习本教程。

我正在使用与此类似的牛津-IIIT宠物数据和配置文件。

在pipeline_config文件中,我已将微调检查点指定为

fine_tune_checkpoint: "{PATH TO}/ssd_mobilenet_v1_coco_11_06_2017/model.ckpt"
from_detection_checkpoint: false

但是当我跑步时, Python object_detection/train.py ... --train_dir=${PATH_TO_TRAIN_DIR}

我收到警告列表。

警告:root:变量 [MobilenetV1/Conv2d_0/BatchNorm/beta] 在检查点中不可用。

.

.

.

警告:根:变量 [MobilenetV1/Conv2d_9_pointwise/weights] 在检查点不可用

和程序退出说

值错误:没有要保存的变量

我已经使用 python 检查了 ckpt

print_tensors_in_checkpoint_file('{PATH TO}/ssd_mobilenet_v1_coco_11_06_2017/model.ckpt/model.ckpt', '',"")

输出是一个列表。

FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/beta (DT_FLOAT( [32]

.

.

.

FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/weights (DT_FLOAT( [1,1,512,512]

注意:当 finetune_checkpoint 被 禁用时,训练脚本运行良好

from_detection_checkpoint: true

在管道配置文件中

您正在使用的检查点文件实际上需要设置from_detection_checkpoint: true,因为该模型被训练为检测器(因此没有禁用任何内容(。

仅当您想要从为 Imagenet 分类预先训练的 Slim 模型之一开始训练时,才需要设置from_detection_checkpoint: false

最新更新