【caffe学习笔记】Common Layers 普通层

内积/全连接 Inner Product
InnerProduct 层(也被称作全连接层)将输入看成一个一向量,输出也为向量(输出 blob的高和宽都为1)。
  • 层类型: InnerProduct
  • CPU 实现码: ./src/caffe/layers/inner_product_layer.cpp
  • CUDA GPU 实现代码: ./src/caffe/layers/inner_product_layer.cu
参数
Required(必须的参数)
  • num_output (c_o): 层的输出节点数或者理解为滤波器的个数
Strongly Recommended(强力推荐)
  • weight_filler  [default type: 'constant' value: 0]: 参数的初始化方法
Optional(可选的)
  • bias_filler [default type: 'constant' value: 0]
  • bias_term [default true]: 指定是否给每个滤波器添加并训练偏置项
输入
  • n * c_i * h_i * w_i
输出
  • n * c_o * 1 * 1
例子:

layer {
  name: "fc8"
  type: "InnerProduct"
  # learning rate and decay multipliers for the weights
  param { lr_mult: 1 decay_mult: 1 }
  # learning rate and decay multipliers for the biases
  param { lr_mult: 2 decay_mult: 0 }
  inner_product_param {
    num_output: 1000
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
  bottom: "fc7"
  top: "fc8"
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值