标签:
全连接结构中的符号定义如下图:
Backward Propagation
Now we firstly get output layer. As an example, we take cross entropy as loss function, with SoftMax as output function.
So
的求解比较简单。
由于:
bottom节点数, top节点数
, batch数
。则bottom矩阵为
,top矩阵为
,weight 矩阵
, bias为
, bias weight为
。下图给出了这几个关键量在Caffe中的存在形式:
数学形式为:
后向还是分两部分算,一部分是计算; 一部分是计算bottom_diff =
,以作为下一层的top_diff, 这里
实际上就是
, 因此bottom_diff =
。下图给出Caffe计算后向传播时的几个关键量。
CNN Tomography With Caffe - Full Connected Layer
标签:
原文地址:http://www.cnblogs.com/Matrix_Yao/p/5657116.html