Rectified Linear Unit (ReLU)

Rectified Linear Unit (ReLU)TheRectifiedLinearUnit(ReLU)computesthefunctionf(x)=max(0,x)f(x)=max(0,x),whichissimplythresholdedatzero.ThereareseveralprosandconstousingtheReLUs:(Pros)Comparedtosigmoid/tan

ReLUThe Rectified Linear Unit (ReLU) computes the function f(x)=max(0,x) , which is simply thresholded at zero.

There are several pros and cons to using the ReLUs:

  1. (Pros) Compared to sigmoid/tanh neurons that involve expensive operations (exponentials, etc.), the ReLU can be implemented by simply thresholding a matrix of activations at zero. Meanwhile, ReLUs does not suffer from saturating.
  2. (Pros) It was found to greatly accelerate the convergence of stochastic gradient descent compared to the sigmoid/tanh functions. It is argued that this is due to its linear, non-saturating form.
  3. (Cons) Unfortunately, ReLU units can be fragile during training and can “die”. For example, a large gradient flowing through a ReLU neuron could cause the weights to update in such a way that the neuron will never activate on any datapoint again. If this happens, then the gradient flowing through the unit will forever be zero from that point on. That is, the ReLU units can irreversibly die during training since they can get knocked off the data manifold. For example, you may find that as much as 40% of your network can be “dead” (i.e., neurons that never activate across the entire training dataset) if the learning rate is set too high. With a proper setting of the learning rate this is less frequently an issue.

Leaky ReLU

Leaky ReLU Leaky ReLUs are one attempt to fix the “dying ReLU” problem. Instead of the function being zero when x<0 , a leaky ReLU will instead have a small negative slope(of 0.01, or so). That is, the function computes f(x)=ax if x<0 and f(x)=x if x⩾0 , where a is a small constant. Some people report success with this form of activation function, but the results are not always consistent.

Parametric ReLU

rectified unit family
The first variant is called parametric rectified linear unit (PReLU). In PReLU, the slopes of negative part are learned from data rather than pre-defined.

Randomized ReLU

In RReLU, the slopes of negative parts are randomized in a given range in the training, and then fixed in the testing. As mentioned in [B. Xu, N. Wang, T. Chen, and M. Li. Empirical Evaluation of Rectified Activations in Convolution Network. In ICML Deep Learning Workshop, 2015.], in a recent Kaggle National Data Science Bowl (NDSB) competition, it is reported that RReLU could reduce overfitting due to its randomized nature. Moreover, suggested by the NDSB competition winner, the random

ai
in training is sampled from 1/U(3,8) and in test time it is fixed as its expectation, i.e., 2/(l+u)=2/11 .

In conclusion, three types of ReLU variants all consistently outperform the original ReLU in these three data sets. And PReLU and RReLU seem better choices.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/210108.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长

相关推荐

  • 检测死链的工具[通俗易懂]

    检测死链的工具[通俗易懂]
    XenuLinkSleuth:一种很小很强大的检查网站死链接的工具
    在测试网站的过程中,常常需要检查网站里的所有链接是否正常,如果一个个去点击各个页面来测试,不仅让测试人员感到非常枯燥,也浪费时间。举例来说,如果一个门户网站,首页有100个链接,每个二级页面又有50个链接,那么这样简单一算就是5000次点击,一个测试人员每2秒检查一个页面,要花10000秒,约2.8个小时,还不能100%保证所有的页面都check到位,多少会有点担心:是不是有漏掉的。
    这里借用xenul

    2022年7月23日
  • ThinkPHP5+小程序商城 网盘视频

    ThinkPHP5+小程序商城 网盘视频

    2021年10月31日
  • JavaScript匿名函数理解及应用[通俗易懂]

    JavaScript匿名函数理解及应用[通俗易懂]匿名函数匿名函数顾名思义就是没有名字的函数,在实际开发中经常会用到,也是JavaScript的重点。匿名函数又叫立即执行函数。由于这种函数是匿名的,所以它不能被调用。由于它不能被调用,所以如果它不立即执行的话就没有了意义。由于它需要立即执行,所以在执行完之后匿名函数就会被销毁。匿名自执行函数的作用就是用于闭包和创建独立的命名空间两个方面。匿名函数的基本形式为(function(){…})();前面的括号包含函数体,后面的括号就是给匿名函数传递参数然后立即执行。匿名函数的作用是避免全局变量

    2022年10月4日
  • 美国100部推理小说排行榜第一_好看的悬疑小说排行榜前十名

    美国100部推理小说排行榜第一_好看的悬疑小说排行榜前十名这份书单是美国推理作家协会(TheMysteryWritersofAmerica,简称MWA)票选出来的史上最经典的一百部推理小说排行榜。评选过程极为复杂,首先由推理协会选出本格派、硬汉派、惊悚派、间谍小说等推理小说十个主要流派的十个代表作家,再由这十个作家选出各流派的十部代表作品,然后由协会会员投票排出名次。所以这份书单不仅仅有总的一百强排行榜,还有各个不同流派的十大杰作排名,其中本格和…

    2022年9月28日
  • Python 连接数据库两种方式

    Python 连接数据库两种方式Python连接数据库两种方式

    2022年11月2日
  • 新书上市 | 世界名校数据挖掘经典《斯坦福数据挖掘教程(第3版)》「建议收藏」

    新书上市 | 世界名校数据挖掘经典《斯坦福数据挖掘教程(第3版)》「建议收藏」题图|作者为ScottUllman《斯坦福数据挖掘教程(第3版)》上架之后,这是我们第一次整篇文章介绍这本书。这本书相当受欢迎(前两个版本累计销量超过5万册),尤其是受学校青…

    2022年6月26日

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号