hyperbolic tangent (=tanh
)와 유사한 함수.
tanh
대신 activation function으로 사용되는 경우도 있음.
softsign(x)=x1+|x|softsign(x)=x1+|x|
softsign의 derivative는 다음과 같음.
ddxsoftsign(x)=1(1+|x|)2ddxsoftsign(x)=1(1+|x|)2
차트 비교

관련소스
import numpy as np import matplotlib.pyplot as plt x = np.linspace(-20.,20., 100) softsign = x/ (1.+np.abs(x)) logistic = 1/ (1+np.exp(-x)) tanh = np.tanh(x) fig,ax = plt.subplots(1,1) ax.plot(x,softsign, label='soft sign') ax.plot(x,logistic, label='logistic') ax.plot(x,tanh, label='tanh') ax.legend() ax.grid()
참고자료들
2023.08.13 - [Computer] - [DL] Hyperbolic Tangent Function (tanh)
[DL] Hyperbolic Tangent Function (tanh)
logistic function과 함께 sigmoid의 대표적인 함수가 바로 tanhtanh임. 값이 [−1,1][−1,1]의 range를 가지며, logistic에 비해 기울기가 보다 급격하기 때문에 좀 더 빠른 수렴속도를 보임. 하지만, sigmoid의 일종
dsaint31.tistory.com
2022.12.28 - [.../Math] - [Math] Sigmoid function
[Math] Sigmoid function
S자형 곡선을 갖는 함수. (대표적인 예가 logistic function이나 sigmoid는 다음과 같이 여러 종류가 있음) Artificial Neural Network의 Artificial Neron의 Activation function으로 초창기에 많이 사용되었음. Logistic dist
dsaint31.tistory.com
https://gist.github.com/dsaint31x/9de184e851b49f3f3232b0498648bc0c
math_softsign.ipynb
math_softsign.ipynb. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
'... > Math' 카테고리의 다른 글
[Math] The Cauchy-Schwarz Inequality (0) | 2023.08.22 |
---|---|
[Math] Bernoulli Distribution (베르누이 분포) (0) | 2023.08.17 |
[Math] Random Variable의 연산에 따른 Mean과 Variance. (0) | 2023.08.14 |
[Math] log의 base 변환하기. (0) | 2023.08.13 |
[Math] log (logarithmic) function (0) | 2023.08.13 |