我正在关注此tutorial。
我正在使用类似于this的Oxford-IIIT Pet数据和配置文件。
在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]在检查点中不可用。
警告:root:变量[MobilenetV1 / Conv2d_9_pointwise / weights]在检查点不可用
和程序退出说
ValueError:无需保存变量
我已经使用
检查了python中的ckptprint_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
管道配置文件中的
答案 0 :(得分:3)
您正在使用的检查点文件实际上需要设置from_detection_checkpoint: true
,因为该模型已经过训练为检测器(因此没有禁用任何内容)。
如果您想从预先训练过Imagenet分类的Slim models之一开始训练,则只需设置from_detection_checkpoint: false
。