惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
TaoSecurity Blog
TaoSecurity Blog
T
Threat Research - Cisco Blogs
Cisco Talos Blog
Cisco Talos Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tenable Blog
C
Cybersecurity and Infrastructure Security Agency CISA
GbyAI
GbyAI
Microsoft Security Blog
Microsoft Security Blog
N
Netflix TechBlog - Medium
AWS News Blog
AWS News Blog
Security Latest
Security Latest
L
LINUX DO - 热门话题
Blog — PlanetScale
Blog — PlanetScale
T
Threatpost
Stack Overflow Blog
Stack Overflow Blog
Vercel News
Vercel News
S
Securelist
I
Intezer
D
Darknet – Hacking Tools, Hacker News & Cyber Security
H
Heimdal Security Blog
T
The Exploit Database - CXSecurity.com
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Hacker News
The Hacker News
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Hackread – Cybersecurity News, Data Breaches, AI and More
U
Unit 42
The Register - Security
The Register - Security
NISL@THU
NISL@THU
S
Schneier on Security
M
MIT News - Artificial intelligence
The Last Watchdog
The Last Watchdog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
Y
Y Combinator Blog
Know Your Adversary
Know Your Adversary
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
美团技术团队
W
WeLiveSecurity
P
Privacy International News Feed
Forbes - Security
Forbes - Security
H
Hacker News: Front Page
小众软件
小众软件
博客园 - 【当耐特】
P
Proofpoint News Feed
P
Privacy & Cybersecurity Law Blog
T
Tor Project blog

RAIS

LSTM - 长短期记忆网络 - RAIS 三种梯度下降算法的区别(BGD, SGD, MBGD) - RAIS PCA - 主成分分析法 - RAIS 深度学习中的正则化(一) - RAIS | Blog 深度前馈网络 - RAIS | Blog 构建机器学习算法 - RAIS | Blog 随机梯度下降 - RAIS | Blog 无监督学习算法 - RAIS | Blog 监督学习算法 - RAIS | Blog 最大似然估计与最大后验估计 - RAIS | Blog 估计、偏差和方差 - RAIS | Blog 超参数、验证集和K-折交叉验证 - RAIS | Blog 过拟合和欠拟合 - RAIS | Blog 机器学习算法 - RAIS | Blog 深度学习中的数值计算 - RAIS | Blog 深度学习中的信息论 - RAIS | Blog 深度学习中的概率论 - RAIS | Blog 深度学习中的线性代数 - RAIS | Blog 深度学习最佳实践 - RAIS | Blog
Sigmoid 函数 - RAIS | Blog
2021-01-16 · via RAIS

前言

Sigmoid 函数(Logistic 函数)是神经网络中非常常用的激活函数,我们今天来深入了解一下 Sigmoid 函数。

函数形式

$$
S(x)=\frac{1}{1+e^{-x}}
$$

$$
y=\begin{cases}
1, 当 S(x)\geq0.5 \\
0, 当 S(x)<0.5
\end{cases}
$$

$$
S(x)’=\frac{e^{-x}}{(1+e^{-x})^2}=S(x)(1-S(x))
$$

函数图像

Sigmoid

代码实现

代码运行:Colab

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import matplotlib.pyplot as plt
import numpy as np
import math

x = np.linspace(-10, 10, 100)
z = 1 / (1 + np.exp(-x))

plt.title("Sigmoid")
plt.plot(x, z)
plt.xlabel("x")
plt.ylabel("Sigmoid(X)")

plt.savefig("sigmoid.png")
plt.show()
plt.close()

性质及问题

函数值 S(x) 的值域为 (0, 1),常用于二分类问题,函数平滑,易于求导。但是作为激活函数,其计算量大,反向传播求误差梯度时,求导有除法,容易出现梯度消失的情况,在输入接近于正无穷或负无穷时,梯度趋近于 0,发生梯度弥散(随着网络层数的增加,使用反向传播算法计算梯度时,从输出层到最初几层,梯度消失的非常明显,造成整体损失函数对最初几层的权重的导数非常小,这样在使用梯度下降算法时,最初几层权重变化非常慢,甚至无法学习到有用的特征)。因为 Sigmoid 函数值大于 0,因此权重更新只能朝着一个方向更新,可能影响收敛速度。

总结

Sigmoid 函数是神经网络中一种非常常用的激活函数,被广泛应用于逻辑回归,在统计学,机器学习领域有其广泛应用。