当前位置:网站首页>激活函数的优缺点和选择
激活函数的优缺点和选择
2022-04-23 15:23:00 【moletop】
激活函数:
-
意义:增加网络的非线性建模能力,如果没有激活函数,那么该网络仅能够表达线性映射,即便有再多的隐藏层,其整个网络跟单层神经网络也是等价
-
需要具备的特点:1.连续可导。2,尽可能简单,提高网络计算效率。3,值域在合适区间内,否则影响训练效率和稳定性。
-
饱和激活函数:Sigmoid、Tanh。非饱和激活函数:ReLu。还有输出层(分类器)的softmax
-
激活函数的选择:在隐藏层ReLu>Tanh>Sigmoid 。RNN中:Tanh,Sigmoid。输出层:softmax(分类任务)。出现神经元死亡,可以用PRelu。
1**.Sigmoid**:
优点:<1> Sigmoid的取值范围在(0, 1),符合概率,而且是单调递增,比较容易优化。
<2> Sigmoid求导比较容易,可以直接推导得出。
缺点:
<1> Sigmoid函数收敛比较缓慢。
<2> 由于Sigmoid是软饱和,容易产生梯度消失,对于深度网络训练不太适合易导致梯度消失。
<3> Sigmoid函数并不是以(0,0)为中心点,破环数据分布。
2.Tanh函数
优点:<1> 函数输出以(0,0)为中心。缺点:<1> tanh并没有解决sigmoid梯度消失的问题。
3.ReLU函数
优点:<1> 在SGD中收敛速度要比Sigmoid和tanh快很多
<2> 有效的缓解了梯度消失问题。
缺点:
<1> 在训练过程中容易出现神经元失望(负半轴),之后梯度永远为0的情况,造成不可逆的死亡。
<2>导数是1,缓解梯度消失的问题,但是容易梯度爆炸。
4.ReLu改进
版权声明
本文为[moletop]所创,转载请带上原文链接,感谢
https://blog.csdn.net/Leiroy/article/details/124116382
边栏推荐
- JSON date time date format
- MySQL InnoDB transaction
- Mysql database explanation (10)
- How does eolink help telecommuting
- Summary of interfaces for JDBC and servlet to write CRUD
- Detailed explanation of C language knowledge points - data types and variables [2] - integer variables and constants [1]
- Have you learned the basic operation of circular queue?
- Will golang share data with fragment append
- Async keyword
- The life cycle of key value in redis module programming
猜你喜欢
Deep learning - Super parameter setting
Thinkphp5 + data large screen display effect
The win10 taskbar notification area icon is missing
G007-HWY-CC-ESTOR-03 华为 Dorado V6 存储仿真器搭建
How to design a good API interface?
setcontext getcontext makecontext swapcontext
How does eolink help telecommuting
Nuxt project: Global get process Env information
API gateway / API gateway (II) - use of Kong - load balancing
Tun equipment principle
随机推荐
YML references other variables
Flink datastream type system typeinformation
Mysql database explanation (8)
买卖股票的最佳时机系列问题
我的树莓派 Raspberry Pi Zero 2W 折腾笔记,记录一些遇到的问题和解决办法
About UDP receiving ICMP port unreachable
Async keyword
Differential privacy (background)
Openstack command operation
JS -- realize click Copy function
async关键字
Tun equipment principle
How to write the keywords in the cover and title? As we media, why is there no video playback
[thymeleaf] handle null values and use safe operators
Redis master-slave synchronization
Redis cluster principle
Adobe Illustrator menu in Chinese and English
Detailed explanation of C language knowledge points -- first understanding of C language [1] - vs2022 debugging skills and code practice [1]
Detailed explanation of MySQL connection query
Openstack theoretical knowledge