日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

深度学习的Xavier初始化方法

發布時間:2023/11/28 生活经验 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 深度学习的Xavier初始化方法 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在tensorflow中,有一個初始化函數:tf.contrib.layers.variance_scaling_initializer。Tensorflow 官網的介紹為:

variance_scaling_initializer(
factor=2.0,
mode='FAN_IN',
uniform=False,
seed=None,
dtype=tf.float32
)
1
2
3
4
5
6
7
Returns an initializer that generates tensors without scaling variance.

When initializing a deep network, it is in principle advantageous to keep the scale of the input variance constant, so it does not explode or diminish by reaching the final layer. This initializer use the following formula:

if mode='FAN_IN': # Count only number of input connections.
n = fan_in
elif mode='FAN_OUT': # Count only number of output connections.
n = fan_out
elif mode='FAN_AVG': # Average number of inputs and output connections.
n = (fan_in + fan_out)/2.0

truncated_normal(shape, 0.0, stddev=sqrt(factor / n))
1
2
3
4
5
6
7
8
這段話可以理解為,通過使用這種初始化方法,我們能夠保證輸入變量的變化尺度不變,從而避免變化尺度在最后一層網絡中爆炸或者彌散。

這個方法就是 Xavier 初始化方法,可以從以下這兩篇論文去了解這個方法:

·X. Glorot and Y. Bengio. Understanding the difficulty of training deepfeedforward neural networks. In International Conference on Artificial Intelligence and Statistics, pages 249–256, 2010.
Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S.Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast featureembedding. arXiv:1408.5093, 2014.
或者可以通過這些文章去了解:

CNN數值
三種權重的初始化方法
深度學習——Xavier初始化方法
---------------------
作者:路雖遠在路上
來源:CSDN
原文:https://blog.csdn.net/u010185894/article/details/71104387
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!

?

總結

以上是生活随笔為你收集整理的深度学习的Xavier初始化方法的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。