当前位置:网站首页>激活函数的优缺点和选择
激活函数的优缺点和选择
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
边栏推荐
- MySQL sync could not find first log file name in binary log index file error
- Comparaison du menu de l'illustrateur Adobe en chinois et en anglais
- 我的树莓派 Raspberry Pi Zero 2W 折腾笔记,记录一些遇到的问题和解决办法
- JUC学习记录(2022.4.22)
- Leetcode167 - sum of two numbers II - double pointer - bisection - array - Search
- Mysql database explanation (10)
- Introduction to distributed transaction Seata
- JSON date time date format
- The difference between having and where in SQL
- Collation of errors encountered in the use of redis shake
猜你喜欢
机器学习——逻辑回归
G007-HWY-CC-ESTOR-03 华为 Dorado V6 存储仿真器搭建
8.4 realization of recurrent neural network from zero
UML学习_day2
Openfaas practice 4: template operation
Mysql database explanation (IX)
The win10 taskbar notification area icon is missing
分享 20 个不容错过的 ES6 的技巧
8.5 concise implementation of cyclic neural network
Tun equipment principle
随机推荐
A series of problems about the best time to buy and sell stocks
setcontext getcontext makecontext swapcontext
MySQL sync could not find first log file name in binary log index file error
大文件如何快速上传?
Sqlserver transaction and lock problem
Example of time complexity calculation
MySQL Basics
For 22 years, you didn't know the file contained vulnerabilities?
Kubernetes详解(九)——资源配置清单创建Pod实战
ffmpeg安装遇错:nasm/yasm not found or too old. Use --disable-x86asm for a crippled build.
Functions (Part I)
函数(第一部分)
Summary of interfaces for JDBC and servlet to write CRUD
Detailed explanation of kubernetes (XI) -- label and label selector
JSON date time date format
T2 iCloud日历无法同步
win10 任务栏通知区图标不见了
The difference between having and where in SQL
Advanced version of array simulation queue - ring queue (real queuing)
JUC learning record (2022.4.22)