【发布时间】:2017-05-03 14:31:21
【问题描述】:
这是问题here 的扩展,该问题是关于如何在训练前将现有权重添加到模型中。
我想使用现有的权重,但我的最后一层输出的是 50 而不是 1000(因为网络经过训练可以对 1000 个项目进行分类)。在上一篇文章中,通过更改输出层的名称,我能够添加权重。但后来我意识到还有其他层依赖于最后一层。这是来自 VGG 网络的 sn-p:
layer {
name: "loss3/classifier"
type: "InnerProduct"
bottom: "pool5/7x7_s1"
top: "loss3/classifier"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
inner_product_param {
num_output: 50
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "loss3/loss3"
type: "SoftmaxWithLoss"
bottom: "loss3/classifier"
bottom: "label"
top: "loss3/loss3"
loss_weight: 1
}
layer {
name: "loss3/top-1"
type: "Accuracy"
bottom: "loss3/classifier"
bottom: "label"
top: "loss3/top-1"
include {
phase: TEST
}
}
layer {
name: "loss3/top-5"
type: "Accuracy"
bottom: "loss3/classifier"
bottom: "label"
top: "loss3/top-5"
include {
phase: TEST
}
accuracy_param {
top_k: 5
}
}
我的问题是:
到底什么是底部和顶部参数?
后面两层“loss3/classifier”的名称需要改吗?
【问题讨论】:
标签: machine-learning neural-network deep-learning caffe