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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - cleardo

大模型的原理学习(一) 我的测试开发十年之路 命令行安装ipa包 ios设备管理 tomcat远程部署 移动线路的测试方案设计 iOS开发过程中的内存监控 iOS添加图片 iOS交叉编译 iOS日志获取 使用flask开发web应用 Python隔离环境的搭建 Ipa打包并安装到iphone 单元测试的痛点 Graphviz入门 - cleardo Iphone常用工具 iOS越狱后必装软件 构建iOS交叉编译环境 pycurl库使用详解
大模型的原理学习(二)
cleardo · 2026-02-04 · via 博客园 - cleardo

(一) 介绍

(二) 损失函数

(三) CNN

(四) RNN

(五) Transformer架构

(六) GPT

(七) 幻觉问题

(八) RAG

(九) MCP

(十) Skills

第一篇链接回顾: 大模型的原理学习(一)

在第二篇中,我们开始学习下损失函数和拟合的概念。

拟合与损失函数

如何判断拟合的好不好?

损失函数或者代价函数(损失函数的平均值)

拟合动画

损失函数:

1、 均方误差

均方误差

2、 二分类交叉熵

二分类交叉熵

如何优化?

梯度下降法

目标:使得代价函数尽可能小,那就要求偏导

函数 =
偏导

经过激活函数=
激活函数

① 计算损失函数 ,选用二分类交叉熵 得到

损失函数

② 对损失函数中的 w 和 b 求偏导,偏导的作用代表的就是参数变化最快的方向,设置一个步长(学习率 η)

步长

③ 更新参数:每经过一次计算,得到一个 W 和 b 就带入一下计算损失函数,看看损失函数有没有变小,如果变小了,说明本次 w 和 b 的调整是有效的,就更新 w 和 b

④ 继续重复 ①~③ 步骤,直到损失函数达到最小。

梯度下降

在神经网络中,是如何通过一层层隐藏函数,最终找出最优的输出?

前向传播:根据输入 x 计算出预测值 y

反向传播:计算预测值与实际值的损失函数,进行梯度优化

梯度下降2

链式法则

偏导链式法则

第三篇,我们将开始学习卷积神经网络的原理

卷积神经网络(Convolutional Neural Network, CNN)

前面我们都是以一个输入经过神经网络得到一个输出为例,那么当输入很多的时候,神经网络面临什么问题呢?