caffe Python API 之上卷积层(Deconvolution)
Posted HOU_JUN
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了caffe Python API 之上卷积层(Deconvolution)相关的知识,希望对你有一定的参考价值。
对于convolution:
output = (input + 2 * p - k) / s + 1;
对于deconvolution:
output = (input - 1) * s + k - 2 * p;
net.deconv = caffe.layers.Deconvolution( net.conv1, param={"lr_mult": 1, "decay_mult": 1}, convolution_param=dict( num_output=10, stride=32, kernel_size=64, bias_term=False, weight_filler=dict(type="xavier" ), bias_filler=dict(type=‘constant‘, value=0)) ) 输出: layer { name: "deconv" type: "Deconvolution" bottom: "conv1" top: "deconv" param { lr_mult: 1 decay_mult: 1 } convolution_param { num_output: 10 bias_term: false kernel_size: 64 stride: 32 weight_filler { type: "xavier" } bias_filler { type: "constant" value: 0 } }
以上是关于caffe Python API 之上卷积层(Deconvolution)的主要内容,如果未能解决你的问题,请参考以下文章