当前位置:网站首页>Mish-撼动深度学习ReLU激活函数的新继任者
Mish-撼动深度学习ReLU激活函数的新继任者
2022-07-02 09:41:00 【想学习的船】
对激活函数的研究一直没有停止过,ReLU还是统治着深度学习的激活函数,不过,这种情况有可能会被Mish改变。
Diganta Misra的一篇题为“Mish: A Self Regularized Non-Monotonic Neural Activation Function”的新论文介绍了一个新的深度学习激活函数,该函数在最终准确度上比Swish(+.494%)和ReLU(+ 1.671%)都有提高。
他们的小型FastAI团队使用Mish代替ReLU,打破了之前在FastAI全球排行榜上准确性得分记录的一部分。结合Ranger优化器,Mish激活,Flat + Cosine 退火和自注意力层,他们能够获得12个新的排行榜记录!
我们12项排行榜记录中的6项。每条记录都是用Mish而不是ReLU。(蓝色高亮显示,400 epoch的准确率为94.6,略高于我们的20 epoch的准确率为93.8:)
作为他们自己测试的一部分,对于ImageWoof数据集的5 epoch测试,他们说:
Mish在高显著性水平上优于ReLU (P < 0.0001)。(FastAI论坛@ Seb)
Mish已经在70多个基准上进行了测试,包括图像分类、分割和生成,并与其他15个激活函数进行了比较。
什么是Mesh
直接看Mesh的代码会更简单一点,简单总结一下,Mish=x * tanh(ln(1+e^x))。
其他的激活函数,ReLU是x = max(0,x),Swish是x * sigmoid(x)。
PyTorch的Mish实现:
Tensorflow中的Mish函数:
Tensorflow:x = x *tf.math.tanh(F.softplus(x))
Mish和其他的激活函数相比怎么样?
下图显示了Mish与其他一些激活函数的测试结果。这是多达73个测试的结果,在不同的架构,不同的任务上:
为什么Mish表现这么好?
以上无边界(即正值可以达到任何高度)避免了由于封顶而导致的饱和。理论上对负值的轻微允许允许更好的梯度流,而不是像ReLU中那样的硬零边界。
最后,可能也是最重要的,目前的想法是,平滑的激活函数允许更好的信息深入神经网络,从而得到更好的准确性和泛化。
尽管如此,我测试了许多激活函数,它们也满足了其中的许多想法,但大多数都无法执行。这里的主要区别可能是Mish函数在曲线上几乎所有点上的平滑度。
这种通过Mish激活曲线平滑性来推送信息的能力如下图所示,在本文的一个简单测试中,越来越多的层被添加到一个测试神经网络中,而没有一个统一的函数。随着层深的增加,ReLU精度迅速下降,其次是Swish。相比之下,Mish能更好地保持准确性,这可能是因为它能更好地传播信息:
更平滑的激活功能允许信息更深入地流动……注意,随着层数的增加,ReLU快速下降。
如何把Mish放到你自己的网络中?
Mish的PyTorch和FastAI的源代码可以在github的两个地方找到:
1、官方Mish github:https://github.com/digantamisra98/Mish
2、非官方的Mish使用inline提升速度:https://github.com/lessw2020/mish
总结
ReLU有一些已知的弱点,但是通常它执行起来很轻,并且在计算上很轻。Mish具有较强的理论渊源,在测试中,就训练稳定性和准确性而言,Mish的平均性能优于ReLU。
复杂度只稍微增加了一点(V100 GPU和Mish,相对于ReLU,每epoch增加大约1秒),考虑到训练稳定性的提高和最终精度的提高,稍微增加一点时间似乎是值得的。
最终,在今年测试了大量新的激活函数后,Mish在这方面处于领先地位,许多人怀疑它很有可能成为AI未来的新ReLU。
边栏推荐
- Tdsql | difficult employment? Tencent cloud database micro authentication to help you
- Attribute acquisition method and operation notes of C # multidimensional array
- On April 17, 2022, the five heart matchmaker team received double good news
- HOW TO ADD P-VALUES TO GGPLOT FACETS
- Tiktok overseas tiktok: finalizing the final data security agreement with Biden government
- MySQL comparison operator in problem solving
- Compilation errors and printout garbled problems caused by Chinese content in vs2019 code
- MySQL linked list data storage query sorting problem
- GGPLOT: HOW TO DISPLAY THE LAST VALUE OF EACH LINE AS LABEL
- Dynamic memory (advanced 4)
猜你喜欢

The computer screen is black for no reason, and the brightness cannot be adjusted.

YYGH-BUG-05

Is the Ren domain name valuable? Is it worth investing? What is the application scope of Ren domain name?

Tiktok overseas tiktok: finalizing the final data security agreement with Biden government

GGHIGHLIGHT: EASY WAY TO HIGHLIGHT A GGPLOT IN R

CTF record

GGPLOT: HOW TO DISPLAY THE LAST VALUE OF EACH LINE AS LABEL

K-Means Clustering Visualization in R: Step By Step Guide

HOW TO CREATE AN INTERACTIVE CORRELATION MATRIX HEATMAP IN R

R HISTOGRAM EXAMPLE QUICK REFERENCE
随机推荐
Wechat applet uses Baidu API to achieve plant recognition
基于Hardhat编写合约测试用例
GGPLOT: HOW TO DISPLAY THE LAST VALUE OF EACH LINE AS LABEL
Order by注入
[visual studio 2019] create MFC desktop program (install MFC development components | create MFC application | edit MFC application window | add click event for button | Modify button text | open appl
flutter 问题总结
Redis exceeds the maximum memory error oom command not allowed when used memory & gt; ' maxmemory'
Digital transformation takes the lead to resume production and work, and online and offline full integration rebuilds business logic
Always report errors when connecting to MySQL database
Seriation in R: How to Optimally Order Objects in a Data Matrice
行業的分析
Cluster Analysis in R Simplified and Enhanced
Fabric.js 3个api设置画布宽高
PX4 Position_ Control RC_ Remoter import
A white hole formed by antineutrons produced by particle accelerators
easyExcel和lombok注解以及swagger常用注解
Astparser parsing class files with enum enumeration methods
Research on and off the Oracle chain
由粒子加速器产生的反中子形成的白洞
HOW TO ADD P-VALUES TO GGPLOT FACETS



