在神經(jīng)網(wǎng)絡中,經(jīng)常要使用到激活函數(shù),對于激活函數(shù)的選用,我暫時沒有找到很好的指導信息(如果有,麻煩告訴我),但是對于激活函數(shù)的選用,可以根據(jù)神經(jīng)網(wǎng)絡的用途及其場景,再加上對于激活函數(shù)的值域的了解,大致可以選定適合對應用途以及場景的激活函數(shù);例如,對于分類器,最終輸出的是輸入樣本,在某一類上的可能性(概率),而概率值一般在[0,1]之間,因而最后一層輸出的時候,可以選用值域在[0,1]之間的激活函數(shù),比如說sigmoid函數(shù)。諸如此類的問題,可以根據(jù)值域來選擇激活函數(shù)的運用,下列是一些常見的激活函數(shù),及其函數(shù)圖像,我會不定期的添加我遇到的一些新的激活函數(shù)。
1.sigmoid激活函數(shù)
函數(shù)的定義為:
值域為(0,1)
函數(shù)圖像如下:
2.tanh激活函數(shù)
函數(shù)的定義為:
值域為(-1,1)
函數(shù)圖像如下:
3.Relu激活函數(shù)
來源: Nair V, Hinton G E. Rectified linear units improve restricted boltzmann machines[C]//Proceedings of the 27th international conference on machine learning (ICML-10). 2010: 807-814.
R Hahnloser, R. Sarpeshkar, M A Mahowald, R. J. Douglas, H.S. Seung (2000). Digital selection and analogue amplification coexist in a cortex-inspired silicon circuit. Nature. 405. pp. 947–951
函數(shù)的定義為:
f(x) = max(0, x)
值域為[0,+∞)
函數(shù)圖像如下:
4.Leak Relu激活函數(shù)
函數(shù)定義為:
值域為(-∞,+∞)
圖像如下(α為0.5的情況)
5. SoftPlus激活函數(shù)
函數(shù)的定義為:
值域為(0,+∞)
函數(shù)圖像如下:
6.Soft Max
函數(shù)定義為:
定義域為R
值域為[0,1]
7.Maxout
來源:Goodfellow I J, Warde-Farley D, Mirza M, et al. Maxout networks[J]. arXiv preprint arXiv:1302.4389, 2013.
函數(shù)定義為:
值域(-∞,+ ∞)