激活函数——tanh函数(理解)

0 - 定义

  $tanh$是双曲函数中的一个,$tanh()$为双曲正切。在数学中,双曲正切“$tanh$”是由基本双曲函数双曲正弦和双曲余弦推导而来。

$$tanhx=\frac{sinhx}{coshx}=\frac{e^x-e^{-x}}{e^x+e^{-x}}$$

  其曲线如下图所示:

        

1 - 导数

$$\begin{align*}
tanh^{'}(x)&=((e^x-e^{-x})(e^x+e^{-x})^{-1})^{'} \\
&=(e^x+e^{-x})(e^x+e^{-x})^{-1}-(e^x-e^{-x})(e^x+e^{-x})^{-2}(e^x-e^{-x})\\
&=1-\frac{(e^x-e^{-x})^{2}}{(e^x+e^{-x})^{2}}\\
&=1-tanh^2(x)
\end{align*}$$

2 - 参考资料

https://baike.baidu.com/item/tanh/19711736?fr=aladdin

 

posted @ 2018-10-25 21:23  CZiFan  阅读(115071)  评论(0编辑  收藏  举报