Chapter 1.4 激活函数

下面介绍常见的激活函数

激活函数都在tf.nn中

最常见的是relu函数,它将所有小于0的值置为0


可以看到relu在的输出可以趋近正无穷,这样的情况有可能导致梯度消失或者是梯度爆炸,relu6函数是在relu基础上加上上界

显然6是上界

relu6

其次是sigmoid函数,但是因为其不是zero-center,所以现在很少直接用这个函数做激活函数


sigmoid

因为sigmoid不是zero-center的,tanh函数和sigmoid类似,但是是zero-center的


softsign:这个函数常用于作为激活函数,其可以看做是符号函数的平滑近似

The softsign function also gets used as an activation function. The form of thisfunction is x/(abs(x) + 1). The softsign function is supposed to be a continuous approximation to the sign function. It appears as follows


softplus:可以看做是relu的一种平滑近似

the softplus, is a smooth version of the ReLU function. The form of this function is  log(exp(x) + 1)



Exponential Linear Unit (ELU) is very similar to the softplus function except that the bottom asymptote is -1 instead of 0. The form is (exp(x)+1) if x < 0 else x. It appears as follows

也就是说elu的下限为-1,是relu的平滑近似


对比效果图:




最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 文章作者:Tyan博客:noahsnail.com | CSDN | 简书 声明:作者翻译论文仅为学习,如有侵权请...
    SnailTyan阅读 10,620评论 0 8
  • 周末,我带儿子去天文馆。开始,我与儿子一样,充满好奇,进行着扫盲。身临其境看完科普小电影“星空音乐会”后,我就拿起...
    向日葵燕子阅读 1,326评论 0 0
  • _兔崽子_阅读 1,098评论 0 0
  • 我这个人神经比较大条,跟异性相处是我的弱项,故而婚结得晚,三十周岁才有了第一个娃。在我朋友普遍迈入二胎时代的时候。...
    亦亦夏阅读 877评论 0 0
  • 彻底离开高中生活的那个夏天,应该是我人生中最美好的岁月,至少在现在看来是这样。人们都说伤痛比快乐记的更真实,或许真...
    王玦阅读 1,950评论 0 0