如何解决使用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 举报,一经查实,本站将立刻删除。