码迷,mamicode.com
首页 > 编程语言 > 详细

caffe Python API 之上卷积层(Deconvolution)

时间:2018-11-06 11:12:06      阅读:376      评论:0      收藏:0      [点我收藏+]

标签:fill   ons   weight   tom   div   value   dict   ali   size   

对于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)

标签:fill   ons   weight   tom   div   value   dict   ali   size   

原文地址:https://www.cnblogs.com/houjun/p/9913325.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!