我使用 16 层 VGGnet 从图像中提取特征。它输出一个 4096 维的特征向量。但是,我需要一个 1024 维向量。如何进一步将此 4096 向量缩减为 1024 向量?我需要在上面添加一个新层fc7
吗?
1120 次
2 回答
3
是的,您需要在fc7
. 这就是你最后几层的样子
layers {
bottom: "fc7"
top: "fc7"
name: "relu7"
type: RELU
}
layers {
bottom: "fc7"
top: "fc7"
name: "drop7"
type: DROPOUT
dropout_param {
dropout_ratio: 0.5
}
}
layers {
name: "fc8"
bottom: "fc7"
top: "fc8"
type: INNER_PRODUCT
inner_product_param {
num_output: 1024
}
blobs_lr: 0
blobs_lr: 0
}
layers {
name: "loss"
type: SOFTMAX_LOSS
bottom: "fc8"
bottom: "label"
top: "loss/loss"
}
layers {
name: "accuracy/top1"
type: ACCURACY
bottom: "fc8"
bottom: "label"
top: "accuracy@1"
include: { phase: TEST }
accuracy_param {
top_k: 1
}
}
于 2016-03-02T11:16:33.600 回答
2
是的。
于 2016-01-06T06:28:19.327 回答