Dear Evan,
I do not find bilinear init in voc-fcn32s/train.prototxt, so I add `weight_filler {type: "bilinear"} ` in the "upscore" deconv layer, and train about 1000 iterations.
But I found my trained "snapshot/train_iter_1000.caffemodel" is different from "fcn32s-heavy-pascal.caffemodel" on upscore layer.
net0 = caffe.Net('voc-fcn32s/deploy.prototxt', 'voc-fcn32s/snapshot/train_iter_1000.caffemodel', caffe.TEST)
net1 = caffe.Net('voc-fcn32s/deploy.prototxt', 'voc-fcn32s/fcn32s-heavy-pascal.caffemodel', caffe.TEST)
net0.params['upscore'][0].data
[[ 0.00024414, 0.00073242, 0.0012207 , ..., 0.0012207 ,
0.00073242, 0.00024414],
[ 0.00073242, 0.00219727, 0.00366211, ..., 0.00366211,
0.00219727, 0.00073242],
[ 0.0012207 , 0.00366211, 0.00610352, ..., 0.00610352,
0.00366211, 0.0012207 ],
...,
[ 0.0012207 , 0.00366211, 0.00610352, ..., 0.00610352,
0.00366211, 0.0012207 ],
[ 0.00073242, 0.00219727, 0.00366211, ..., 0.00366211,
0.00219727, 0.00073242],
[ 0.00024414, 0.00073242, 0.0012207 , ..., 0.0012207 ,
0.00073242, 0.00024414]],
[[ 0.00024414, 0.00073242, 0.0012207 , ..., 0.0012207 ,
0.00073242, 0.00024414],
[ 0.00073242, 0.00219727, 0.00366211, ..., 0.00366211,
0.00219727, 0.00073242],
[ 0.0012207 , 0.00366211, 0.00610352, ..., 0.00610352,
0.00366211, 0.0012207 ],
...,
[ 0.0012207 , 0.00366211, 0.00610352, ..., 0.00610352,
0.00366211, 0.0012207 ],
[ 0.00073242, 0.00219727, 0.00366211, ..., 0.00366211,
0.00219727, 0.00073242],
[ 0.00024414, 0.00073242, 0.0012207 , ..., 0.0012207 ,
0.00073242, 0.00024414]]]], dtype=float32)
net1.params['upscore'][0].data
[[ 0. , 0. , 0. , ..., 0. ,
0. , 0. ],
[ 0. , 0. , 0. , ..., 0. ,
0. , 0. ],
[ 0. , 0. , 0. , ..., 0. ,
0. , 0. ],
...,
[ 0. , 0. , 0. , ..., 0. ,
0. , 0. ],
[ 0. , 0. , 0. , ..., 0. ,
0. , 0. ],
[ 0. , 0. , 0. , ..., 0. ,
0. , 0. ]],
[[ 0.00024414, 0.00073242, 0.0012207 , ..., 0.0012207 ,
0.00073242, 0.00024414],
[ 0.00073242, 0.00219727, 0.00366211, ..., 0.00366211,
0.00219727, 0.00073242],
[ 0.0012207 , 0.00366211, 0.00610352, ..., 0.00610352,
0.00366211, 0.0012207 ],
...,
[ 0.0012207 , 0.00366211, 0.00610352, ..., 0.00610352,
0.00366211, 0.0012207 ],
[ 0.00073242, 0.00219727, 0.00366211, ..., 0.00366211,
0.00219727, 0.00073242],
[ 0.00024414, 0.00073242, 0.0012207 , ..., 0.0012207 ,
0.00073242, 0.00024414]]]], dtype=float32)
which means net0.params['upscore'][0].data[0,0,:,:] and net1.params['upscore'][0].data[0,0,:,:] are all the same.
However, net1.params['upscore'][0].data[0,1,:,:] are all zeros, net0.params['upscore'][0].data[0,0,:,:] are not.
Where am I wrong?
Thanks a lot.
在 2016年7月26日星期二 UTC+8上午5:48:21,Evan Shelhamer写道: