caffe 功能层之Eltwise层

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/FUZHENQI/article/details/78455369

Eltwise层的操作有三个:product(点乘), sum(相加减) 和 max(取大值),其中sum是默认操作。假设输入(bottom)为A和B,如果要实现element_wise的A+B,即A和B的对应元素相加,prototxt文件如下:

layer 
{
  name: "eltwise_layer"
  type: "Eltwise"
  bottom: "A"
  bottom: "B"
  top: "diff"
  eltwise_param {
    operation: SUM
  }
}​

如果实现A-B,则prototxt为:

layer 
{
  name: "eltwise_layer"
  type: "Eltwise"
  bottom: "A"
  bottom: "B"
  top: "diff"
  eltwise_param {
    operation: SUM
    coeff: 1
    coeff: -1
  }
}​

参考博客http://blog.csdn.net/laingliang/article/details/55048937

猜你喜欢

转载自blog.csdn.net/FUZHENQI/article/details/78455369
今日推荐