使用TensorFlow对象检测API在转移学习中添加类

问题描述

嗨,我仍在尝试使用Tensorflow对象检测API构建自己的模型。

我正在使用tf版本1.15.2。

我目前正在使用从tensorflow1模型动物园下载的 facessd_mobilenet_v2_quantized_open_image_v4 https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1_detection_zoo.md

该模型被训练为只有1个类别(面孔),但是我想将模型重新训练为具有2个类别(面孔1,面孔2)。我正在尝试通过使用下载模型中的权重来进行迁移学习。我尝试从检查点还原,但是由于形状差异,似乎有些权重无法还原。

更具体地说,我收到了如下警告消息: W0807 05:31:02.782229 140581259032384 variables_helper.py:153] Variable [BoxPredictor_1/Classpredictor/weights] is available in checkpoint,but has an incompatible shape with model variable. Checkpoint shape: [[3,3,1280,12]],model variable shape: [[3,18]]. This variable will not be initialized from the checkpoint.

有什么方法可以通过增加类的数量从预训练的模型中训练模型?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)