我无法从头开始训练VGG NET模型。请允许我描述到目前为止的步骤:从我的训练和验证图像的两个文件夹,标记as training_list.txt和…
看着 调试日志 你贴了,你可以清楚地看到出了什么问题:
...] [Forward] Layer conv1, top blob conv1 data: 3.80577 # looks good - non-zero signal ...] [Forward] Layer conv1, param blob 0 data: 0.00792726 # non-zero kernels ...] [Forward] Layer conv1, param blob 1 data: 0 # bias (not so important) . . . ...] [Forward] Layer conv2, top blob conv2 data: 0 # no output signal !!! ...] [Forward] Layer conv2, param blob 0 data: 0 # kernels are all zero !!! ...] [Forward] Layer conv2, param blob 1 data: 0
内核(权重) conv2 都是零,因此你有从这一层出来的所有零点blob,从那里的一切都是零 - 你不能这样学习。
conv2
让我们仔细看看方式 conv1 (好的一层)和 conv2 (坏图层)在您的prorotxt中定义:
conv1
layers { name: "conv1" type: CONVOLUTION bottom: "data" top: "conv1" convolution_param { num_output: 96 kernel_size: 7 stride: 2 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0 } } } . . . layers { name: "conv2" type: CONVOLUTION bottom: "pool1" top: "conv2" convolution_param { num_output: 256 pad: 2 kernel_size: 5 } }
你能看到区别么? 而 conv1 具有 weight_filler 定义的( type: gaussian ) conv2 没有 weight_filler !默认情况下,Caffe初始化内核/权重 conv2 为零,一切都从那一点开始向南......
weight_filler
type: gaussian