Caffe constant multiply layer

谁说胖子不能爱 提交于 2019-12-06 15:42:00

It is possible to do with Power Layer, just set up power to 1 and scale to whatever you need:

layer {
  name: "caffe.ConstantMul_1"
  bottom: "caffe.SpatialConvolution_3"
  top: "caffe.ConstantMul_1"
  type: "Power"
  power_param {
    power: 1
    scale: 0.85
    shift: 0
  }
}

Eltwise layer can do three types of operations - PROD, SUM, MAX. You can see more about this here

In your case, the op paramter should be set as PROD.

layers {
  name: "caffe.ConstantMul_0"
  type: "Eltwise"
  bottom: "caffe.SpatialConvolution_0"
  top: "caffe.ConstantMul_0"
  eltwise_param {
    op: MUL
    coeff: 0.85
  }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!