我正在微调现有网络,添加了我自己的一个输出层。 我正在使用的网络已经过调整,可以识别面部并提取面部特征。
我添加的图层仅添加到最后一部分(我希望在那里还有足够的数据),试图提取偏航角。
更改之前prototxt文件的结尾:
layer {
name: "cls_prob"
type: "Softmax"
bottom: "fc6_3"
top: "cls_prob"
}
layer {
name: "bbox_reg_3"
type: "InnerProduct"
bottom: "fc5_3"
top: "bbox_reg_3"
inner_product_param {
num_output: 3
}
}
layer {
name: "rotate_reg_3"
type: "InnerProduct"
bottom: "fc5_3"
top: "rotate_reg_3"
inner_product_param {
num_output: 1
}
}
与我的变更和培训变更相同的部分:
layer {
name: "cls_prob"
type: "Softmax"
bottom: "fc6_3"
top: "cls_prob"
}
layer {
name: "bbox_reg_3"
type: "InnerProduct"
bottom: "fc5_3"
top: "bbox_reg_3"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
inner_product_param {
num_output: 3
}
}
layer {
name: "rotate_reg_3"
type: "InnerProduct"
bottom: "fc5_3"
top: "rotate_reg_3"
param {
lr_mult: 0
decay_mult: 0
}
param {
lr_mult: 0
decay_mult: 0
}
inner_product_param {
num_output: 1
}
}
layer {
name: "yaw_reg_3"
type: "InnerProduct"
bottom: "fc5_3"
top: "yaw_reg_3"
inner_product_param {
num_output: 1
}
}
layer {
name: "loss"
type: "EuclideanLoss"
bottom: "yaw_reg_3"
bottom: "label"
top: "loss"
}
我添加了yaw_reg_3,但我只看到rotate_reg_3,bbox_reg_3和cls_prob丢失打印内容。
谢谢
答案 0 :(得分:0)
使用gdb调试caffe本身后: 遍历所有层后,如果某个层没有作为另一层的底层出现,则将其确定为输出层。 由于“ yaw_reg_3”是“损失”的底部,因此从技术上讲它不是输出层,因此仅打印损失,而不是预测本身。