caffe学习:Eltwise Layer

xiaoxiao2021-02-28  28

Eltwise层的操作有三个:product(点乘), sum(相加减) 和 max(取大值),其中sum是默认操作。

假设输入bottom为A和B,如果要实现element_wise的A+B,即A和B的对应元素相加,prototxt文件如下:

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

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

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

注意:其中A和B的系数(coefficient)都要给出。

转:http://blog.csdn.net/zhang_shuai12/article/details/53001348
转载请注明原文地址: https://www.6miu.com/read-2628029.html

最新回复(0)