【发布时间】:2017-06-28 22:53:24
【问题描述】:
我正在尝试构建一个包含两个图像输入的网络。每个图像将通过一个网络同时进行后期融合,该网络将合并并给出一个输出。我使用下面的图表来显示我需要什么(ps:抱歉我的英语不太好)
我的网络在 caffe prototxt 模型定义文件中定义,其中包含在池 5 之前定义了两次的准确 AlexNet。对于第一个网络,层的名称与 AlexNet 中的相同,而对于第二个网络,我添加了一个 "_1" 每个图层名称的后缀。 我的问题是如何复制保留的重量?
例如:我的每个网络的卷积层1如下。请注意,对于conv1,可以轻松复制预训练权重,因为层名称与预训练模型中的层名称相同。但是conv1_1 是不同的,所以恐怕我无法复制预训练的权重?或者即使图层名称不同,有没有办法做到这一点?
layer {
name: "conv1"
type: "Convolution"
bottom: "data1"
top: "conv1"
param {
lr_mult: 0
decay_mult: 1
}
param {
lr_mult: 0
decay_mult: 0
}
convolution_param {
num_output: 96
kernel_size: 11
stride: 4
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "conv1_1"
type: "Convolution"
bottom: "data2"
top: "conv1_1"
param {
lr_mult: 0
decay_mult: 1
}
param {
lr_mult: 0
decay_mult: 0
}
convolution_param {
num_output: 96
kernel_size: 11
stride: 4
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
【问题讨论】:
标签: image-processing neural-network deep-learning caffe convolution