当前位置:网站首页>激活函数的优缺点和选择
激活函数的优缺点和选择
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
边栏推荐
- Kubernetes详解(十一)——标签与标签选择器
- Redis master-slave synchronization
- My raspberry PI zero 2W toss notes to record some problems and solutions
- Nacos program connects to mysql8 0+ NullPointerException
- Detailed explanation of kubernetes (XI) -- label and label selector
- Llvm - generate if else and pH
- Sqlserver transaction and lock problem
- Common interview questions of operating system:
- nuxt项目:全局获取process.env信息
- adobe illustrator 菜单中英文对照
猜你喜欢
Openfaas practice 4: template operation
Basic operation of circular queue (Experiment)
Detailed explanation of MySQL connection query
How to upload large files quickly?
The win10 taskbar notification area icon is missing
X509 certificate cer format to PEM format
Wechat applet customer service access to send and receive messages
深度学习——超参数设置
Mysql database explanation (10)
What is the effect of Zhongfu Jinshi wealth class 29800? Walk with professional investors to make investment easier
随机推荐
MySQL sync could not find first log file name in binary log index file error
买卖股票的最佳时机系列问题
Introduction to distributed transaction Seata
大文件如何快速上传?
JS -- realize click Copy function
Redis master-slave synchronization
T2 icloud calendar cannot be synchronized
Three uses of kprobe
Advanced version of array simulation queue - ring queue (real queuing)
Borui data and F5 jointly build the full data chain DNA of financial technology from code to user
免费在upic中设置OneDrive或Google Drive作为图床
The difference between having and where in SQL
MySQL Basics
Subnet division of flannel principle
Modify the default listening IP of firebase emulators
tcp_ Diag kernel related implementation 1 call hierarchy
22年了你还不知道文件包含漏洞?
For 22 years, you didn't know the file contained vulnerabilities?
Educational Codeforces Round 127 A-E题解
TLS / SSL protocol details (30) RSA, DHE, ecdhe and ecdh processes and differences in SSL