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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • python+selenium环境搭建_pycharm配置anaconda环境

    python+selenium环境搭建_pycharm配置anaconda环境最近在研究python+selenium进行自动化测试。然后用的python开发工具是Pycharm。然后,今天就跟大家讲一下怎么搭建一整套的自动化测试环境。安装python首先,安装python。python可以在官网下载。安装可参考链接:http://blog.csdn.net/florachy/article/details/72769813我安装的是python3.6.0:…

    2022年8月28日
  • 那些错过的人和事,已成回忆

    哪些曾经没有做的事情,你现在还想做吗?你现在还能做吗?最近的一些梦,让我思考哪些我当时有机会做,但是最后没有做的事情!现在回忆起来,略有遗憾,也在感慨时间的力量,推着我一直向前,我已经不再是过去的那个我了。我记得小的时候,那会上小学,在学校外面的有个老奶奶开的小卖铺,那个小卖铺里面是用木头搭建的房子,屋顶上面用的是茅草铺的。小卖铺里面卖着一种一毛钱一片的辣条(片),本来这种辣条(片…

    2022年2月27日
  • P2P建立加密通道

    P2P建立加密通道核心:DH秘钥交互算法DH算法:对于非对称加密算法部分支持DH算法(spec256K1、curv25519、ed25519不支持但可以转换到curv25519间接实现),PrivA+PubB=PrivB+PubA,算法在公开双方公钥时就可使用各自保存的私钥,进行秘钥的交换;加密随机种子:随机生成nonce值,使用该nonce值以及交换过的秘钥对数据进行加密,nonce值附加到密文头部…

    2022年5月10日
  • ubuntu安装图形化界面_ubuntu 安装桌面

    ubuntu安装图形化界面_ubuntu 安装桌面系统安装的Ubuntu16.04,默认的桌面的系统不是很习惯,特意安装了xfce4桌面系统。设置开机启动项从Xfce桌面菜单中选择"SettingsManager"(设置管理器)-&gt;Settings"(设置)窗口-&gt;SessionandStartup"(会话和启动)图标。1各种桌面环境下设置开机自启动应用程序的方法↩︎…

    2022年10月29日
  • asp中的session使用方法

    asp中的session使用方法Session是什么呢?简单来说就是服务器给客户端的一个编号。当一台WWW服务器运行时,可能有若干个用户浏览正在运正在这台服务器上的网站。当每个用户首次与这台WWW服务器建立连接时,他就与这个服务器

    2022年7月1日
  • RecyclerView使用_recyclerview是什么

    RecyclerView使用_recyclerview是什么本文目录RecyclerView概述RecyclerView使用-基础篇第一步:添加RecyclerView第二步:添加布局文件第三步:添加逻辑代码运行效果RecyclerView使用-进阶篇布局管理器线性布局管理器网格布局管理器ItemDecorationItem动画Item点击RecyclerView使用-高级篇(上拉刷新下拉加载更多)第一步:添加依赖第二步:布局文件第三步:逻辑代码完整代…

    2022年10月23日

发表回复

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

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