(Caffe)基本类Filter(五)

本文地址:http://blog.csdn.net/mounty_fsc/article/details/51699568

Filter类在Caffe中用来初始化权值大小,有如下表的类型:

类型派生类说明
constantConstantFiller使用一个常数(默认为0)初始化权值
gaussianGaussianFiller使用高斯分布初始化权值
positive_unitballPositiveUnitballFiller
uniformUniformFiller使用均为分布初始化权值
xavierXavierFiller使用xavier算法初始化权值
msraMSRAFiller
bilinearBilinearFiller

1 xavier

使用分布 xU(3/n,+3/n) <script type="math/tex" id="MathJax-Element-1"> x \sim U(-\sqrt{3/n}, +\sqrt{3/n}) </script> 初始化权值 w <script type="math/tex" id="MathJax-Element-2"> w </script> 为。总的来说 n <script type="math/tex" id="MathJax-Element-3">n</script>的值为输入输出规模相关,公式如下:

n=fan_infan_in+fan_out2fan_outdefaultvariance_norm=AVERAGEvariance_norm=FAN_OUT
<script type="math/tex; mode=display" id="MathJax-Element-4">n=\left \{ \begin{aligned} & fan\_in &default \\ & \frac{fan\_in + fan\_out}{2} & variance\_norm=AVERAGE \\ & fan\_out & variance\_norm=FAN\_OUT \end{aligned} \right. </script>

{fan_in=blob.count/blob.numfan_out=blob.count/blob.channels
<script type="math/tex; mode=display" id="MathJax-Element-5">\left \{ \begin{aligned} & fan\_in = blob.count / blob.num \\ & fan\_out = blob.count / blob.channels \end{aligned} \right. </script>

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页