天天看點

Deep Learning (Yoshua Bengio, Ian Goodfellow, Aaron Courville) 翻譯 Part 2 第6章

6.3 hidden units

RELU是hidden單元很好的預設選擇,rectified linear函數在0點不是可微分的,這貌似會使rectified linear函數不能使用基于梯度的訓練算法,而實踐中,梯度下降仍然表現很好。

因為我們不期望訓練達到一個梯度為0的點,cost函數的最小值在一個未定義的梯度是可以接受的,隐藏單元不能微分的情況一般是隻在幾個少數的點,在一個點是可微分的隻有這點的左右導數相等。

大多數隐藏單元接受一個向量輸入x,進行轉換z=Wx+b,然後應用非線性激活函數g(z)

6.3.1 Rectified Linear Units and Their Generalizations

Deep Learning (Yoshua Bengio, Ian Goodfellow, Aaron Courville) 翻譯 Part 2 第6章

初始化參數的時候,最好把b的所有元素都設定比較小,正值,比如0.1

6.3.2 logistic sigmoid and hyperbolic tangent

Deep Learning (Yoshua Bengio, Ian Goodfellow, Aaron Courville) 翻譯 Part 2 第6章

這兩個激活函數很近似因為tanh(z)=2σ(2z)-1

我們已經看到sigmoid單元作為輸出單元,用來預測binary變量的值為1的機率,不像是分段線性的單元,sigmoidal單元saturate在幾乎整個取值域,即它在z是一個大的正值的時候saturate到一個高值,在z是一個很負的值的時候saturate到一個低值,隻在z在0附近的時候敏感,這種很廣泛的saturation會讓基于梯度的訓練很困難,基于這點,sigmoid作為隐藏單元不被鼓勵,而作為輸出單元因為如有一個合适的cost函數能抵消其saturation就可以。

如果必須用sigmoid做隐藏單元,tanh激活函數更好些,因為tanh(0)=0而σ(0)=1/2,

6.4 Architecture Design

6.4.1 universal approximation properties and depth

繼續閱讀