当前位置:网站首页>激活函数的优缺点和选择
激活函数的优缺点和选择
2022-04-23 15:23:00 【moletop】
激活函数:
-
意义:增加网络的非线性建模能力,如果没有激活函数,那么该网络仅能够表达线性映射,即便有再多的隐藏层,其整个网络跟单层神经网络也是等价
-
需要具备的特点:1.连续可导。2,尽可能简单,提高网络计算效率。3,值域在合适区间内,否则影响训练效率和稳定性。
-
饱和激活函数:Sigmoid、Tanh。非饱和激活函数:ReLu。还有输出层(分类器)的softmax
-
激活函数的选择:在隐藏层ReLu>Tanh>Sigmoid 。RNN中:Tanh,Sigmoid。输出层:softmax(分类任务)。出现神经元死亡,可以用PRelu。
1**.Sigmoid**:
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-yx52Vtvu-1649727884516)(D:\Download\picture666-master\img/20220319224913.png)]](/img/79/06a8bafd6694a03023a3532ca3980c.png)

优点:<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
边栏推荐
- Openstack theoretical knowledge
- Sqlserver transaction and lock problem
- Five data types of redis
- Tun equipment principle
- X509 certificate cer format to PEM format
- JS -- realize click Copy function
- Fill in the next right node pointer II of each node [classical hierarchy traversal | regarded as linked list]
- C language super complete learning route (collection allows you to avoid detours)
- C语言超全学习路线(收藏让你少走弯路)
- Three uses of kprobe
猜你喜欢

The wechat applet optimizes the native request through the promise of ES6

Kubernetes详解(十一)——标签与标签选择器

MySQL InnoDB transaction

Leetcode167 - sum of two numbers II - double pointer - bisection - array - Search

How to design a good API interface?

UML学习_day2

How does eolink help telecommuting

8.4 realization of recurrent neural network from zero

TLS / SSL protocol details (28) differences between TLS 1.0, TLS 1.1 and TLS 1.2

Detailed explanation of MySQL connection query
随机推荐
Alexnet model
Adobe Illustrator menu in Chinese and English
Kubernetes详解(十一)——标签与标签选择器
MySQL InnoDB transaction
Detailed explanation of C language knowledge points -- data types and variables [1] - carry counting system
Collation of errors encountered in the use of redis shake
How to upload large files quickly?
Use of common pod controller of kubernetes
setcontext getcontext makecontext swapcontext
22年了你还不知道文件包含漏洞?
C language super complete learning route (collection allows you to avoid detours)
regular expression
Redis cluster principle
Async keyword
JUC学习记录(2022.4.22)
The win10 taskbar notification area icon is missing
Detailed explanation of C language knowledge points -- first understanding of C language [1] - vs2022 debugging skills and code practice [1]
Detailed explanation of redirection and request forwarding
Llvm - generate addition
重定向和请求转发详解