Repository navigation
Expand file tree
/
Copy pathch07.html
More file actions
485 lines (429 loc) · 23 KB
/
Copy pathch07.html
File metadata and controls
485 lines (429 loc) · 23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="第七章:训练 - AI学习笔记">
<meta name="keywords" content="AI, 人工智能, 机器学习, 深度学习">
<meta name="author" content="AI Learner">
<title>第七章:训练 - AI学习笔记</title>
<!-- Google Fonts - Inter -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<!-- KaTeX - 轻量级数学公式渲染 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js"
onload="renderMathInElement(document.body, {
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '\\[', right: '\\]', display: true},
{left: '\\(', right: '\\)', display: false},
{left: '$', right: '$', display: false}
],
throwOnError: false
});"></script>
<!-- Prism.js 代码高亮 - tomorrow-night 主题 -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-python.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-bash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js"></script>
<!-- 自定义样式表 -->
<link rel="stylesheet" href="../../css/main.css">
<link rel="stylesheet" href="../../css/dark-mode.css">
<link rel="stylesheet" href="../../css/mobile-optimizations.css">
<!-- 内联CSS样式 -->
<!-- AI-Notes共享样式 -->
<link rel="stylesheet" href="assets/ai-notes.css">
</head>
<body>
<!-- ==================== 导航栏 ==================== -->
<nav class="ai-nav">
<a href="../../index.html" class="ai-nav-brand">
<i class="fas fa-brain"></i>
AI学习笔记
</a>
<ul class="ai-nav-links" id="navLinks">
<li><a href="index.html"><i class="fas fa-home"></i> 首页</a></li>
<li><a href="ch06.html"><i class="fas fa-box"></i> 模型</a></li>
<li><a href="ch07.html"><i class="fas fa-dumbbell"></i> 训练</a></li>
<li><a href="ch08.html"><i class="fas fa-chart-bar"></i> 评估调优</a></li>
<li><a href="ch09.html"><i class="fas fa-th"></i> CNN</a></li>
<li><a href="ch10.html"><i class="fas fa-random"></i> Transformer</a></li>
<li><a href="ch11.html"><i class="fas fa-language"></i> LLM</a></li>
<li><a href="ch12.html"><i class="fas fa-rocket"></i> 推理部署</a></li>
<li><a href="ch13.html"><i class="fas fa-search"></i> RAG</a></li>
<li><a href="ch14.html"><i class="fas fa-arrows-alt"></i> 向量Embedding</a></li>
</ul>
<button class="ai-nav-toggle" id="navToggle" aria-label="切换导航">
<i class="fas fa-bars"></i>
</button>
</nav>
<!-- ==================== 章节导航 ==================== -->
<nav class="ai-chapter-nav" style="background: #f7fafc; border-bottom: 1px solid #e2e8f0; padding: 1rem 2rem; margin-top: 64px;">
<div style="max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;">
<div class="breadcrumb" style="font-size: 0.9rem; color: #718096;">
<a href="../../index.html" style="color: #4299e1;"><i class="fas fa-home"></i> 首页</a>
<span style="margin: 0 0.5rem;">/</span>
<a href="index.html" style="color: #4299e1;">AI学习笔记</a>
<span style="margin: 0 0.5rem;">/</span>
<span style="color: #2d3748; font-weight: 600;">第七章:训练</span>
</div>
<div class="chapter-links" style="display: flex; gap: 1rem;">
<a href="ch06.html" class="prev-chapter" style="color: #4299e1; font-size: 0.9rem;"><i class="fas fa-arrow-left"></i> 上一章</a>
<a href="ch08.html" class="next-chapter" style="color: #4299e1; font-size: 0.9rem;">下一章 <i class="fas fa-arrow-right"></i></a>
</div>
</div>
</nav>
<!-- ==================== 主内容区域 ==================== -->
<div class="content-wrapper">
<!-- ========== 主内容 ========== -->
<main class="main-content">
<!-- 第七章:训练 -->
<!-- ============================================================ -->
<h2 id="sec1" class="ai-section-title"><i class="fas fa-dumbbell"></i> 第七章:训练</h2>
<div class="ai-box ai-box--objectives">
<h3 id="sub1-1"><i class="fas fa-bullseye"></i> 学习目标</h3>
<ul>
<li>理解训练的定义与核心流程</li>
<li>掌握损失函数的概念与常见类型</li>
<li>理解梯度下降算法的原理与三种变体</li>
<li>理解反向传播的作用与机制</li>
<li>了解学习率、Batch Size、Epoch等关键超参数</li>
</ul>
</div>
<div class="ai-box ai-box--prereq">
<h3 id="sub1-2"><i class="fas fa-book"></i> 前置要求</h3>
<p>第五章:深度学习概述(理解神经网络结构)、第二章:数学基础(理解导数和梯度概念)。</p>
</div>
<figure class="ai-figure">
<img src="https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=Model%20training%20process%20loss%20function%20gradient%20descent%20optimization%20curve%20iterative%20steps%2C%20clean%20educational%20infographic%20style%2C%20flat%20design%2C%20white%20background&image_size=landscape_4_3" alt="模型训练过程与梯度下降优化概念图" loading="lazy">
<figcaption><strong>图7-1</strong> 模型训练过程:损失函数与梯度下降优化的迭代流程</figcaption>
</figure>
<div class="concept-section">
<h2 id="sec2"><i class="fas fa-cogs"></i> 什么是训练?</h2>
<p><span class="keyword-highlight">训练(Training)</span>是让模型从数据中学习的过程。通过反复调整模型参数,使其能准确完成任务。</p>
<div class="concept-box">
<h4><i class="fas fa-running"></i> 类比理解</h4>
<p>训练就像学生做练习题:<br/>做题 → 对照答案 → 发现错误 → 调整方法 → 再做题 → ...<br/>循环直到正确率足够高</p>
</div>
<h3 id="sub2-3">训练的核心流程</h3>
<div class="flow-diagram">
<div class="flow-item">准备数据</div>
<span class="flow-arrow">→</span>
<div class="flow-item">初始化模型</div>
<span class="flow-arrow">→</span>
<div class="flow-item">前向传播</div>
<span class="flow-arrow">→</span>
<div class="flow-item">计算损失</div>
<span class="flow-arrow">→</span>
<div class="flow-item">反向传播</div>
<span class="flow-arrow">→</span>
<div class="flow-item">更新参数</div>
</div>
<h3 id="sub2-4">关键概念详解</h3>
<h4>1. 损失函数(Loss Function)</h4>
<p><span class="keyword-highlight">损失函数</span>衡量模型预测与真实答案的差距。损失越小,模型越好。</p>
<div class="concept-box">
<h4><i class="fas fa-calculator"></i> 损失函数的数学公式</h4>
<p><strong>均方误差(MSE)</strong>——用于回归任务:<br/><br/>
\[ \text{MSE} = \frac{1}{n} \sum_{i=1}^{n} (y_i - \hat{y}_i)^2 \]<br/><br/>
其中 \(y_i\) 是真实值,\(\hat{y}_i\) 是预测值,\(n\) 是样本数量。<br/><br/>
<strong>交叉熵损失(Cross-Entropy)</strong>——用于分类任务:<br/><br/>
\[ H(p, q) = -\sum_{i=1}^{C} p_i \log(q_i) \]<br/><br/>
其中 \(p_i\) 是真实标签的概率分布(one-hot编码),\(q_i\) 是模型预测的概率,\(C\) 是类别数。</p>
</div>
<h4>2. 优化器(Optimizer)</h4>
<p><span class="keyword-highlight">优化器</span>决定如何更新模型参数来降低损失。</p>
<ul>
<li><strong>SGD</strong>:随机梯度下降,最基础</li>
<li><strong>Adam</strong>:自适应学习率,效果稳定,最常用</li>
</ul>
<h4>3. 学习率(Learning Rate)</h4>
<p><span class="keyword-highlight">学习率</span>控制每次参数更新的幅度。</p>
<ul>
<li>太大:不稳定,可能跳过最优解</li>
<li>太小:训练太慢</li>
<li>需要调优找到合适值</li>
</ul>
<div class="concept-box warning">
<h4><i class="fas fa-balance-scale"></i> 批量大小(Batch Size)</h4>
<p>一次训练使用多少样本:<br/>• 小批量:更频繁更新,内存占用小<br/>• 大批量:更新更稳定,但内存占用大</p>
</div>
<h4>4. Epoch、Batch、Iteration</h4>
<p>这三个概念描述训练的循环过程,新手容易混淆,务必理解清楚:</p>
<table class="comparison-table">
<tr>
<th>概念</th>
<th>定义</th>
<th>例子</th>
</tr>
<tr>
<td><strong>Epoch(轮次)</strong></td>
<td>整个数据集被完整学习一遍</td>
<td>1000个样本全部训练完=1个Epoch</td>
</tr>
<tr>
<td><strong>Batch(批次)</strong></td>
<td>一次训练使用的样本数量</td>
<td>每次用32个样本训练=Batch Size=32</td>
</tr>
<tr>
<td><strong>Iteration(迭代)</strong></td>
<td>训练一个Batch需要的步骤</td>
<td>1000样本÷32=31.25≈32次迭代</td>
</tr>
</table>
<div class="concept-box success">
<h4><i class="fas fa-calculator"></i> 具体计算示例</h4>
<p>假设:<br/>
• 数据集有1000张图片<br/>
• Batch Size = 32(每次训练32张)<br/>
• 要训练10个Epoch<br/><br/>
计算:<br/>
• 每个Epoch需要:1000 ÷ 32 = 31.25 ≈ 32次迭代<br/>
• 10个Epoch总共需要:32 × 10 = 320次迭代<br/>
• 模型参数更新320次<br/><br/>
训练时通常会看到进度条显示:"Epoch 3/10, Batch 15/32"</p>
</div>
<h4>为什么需要多个Epoch?</h4>
<p>一次学习(1个Epoch)不足以让模型掌握知识,就像学生不能只看一遍课本就学会。需要多次重复学习,逐渐提高准确率。</p>
<ul>
<li><strong>Epoch太少</strong>:模型没学好,欠拟合</li>
<li><strong>Epoch太多</strong>:模型"背熟了",过拟合(记住训练数据,不能泛化)</li>
<li><strong>合适Epoch</strong>:观察训练曲线,找到损失不再明显下降的点</li>
</ul>
<h4>5. 梯度下降(Gradient Descent)详解</h4>
<p><span class="keyword-highlight">梯度下降</span>是训练模型的核心算法,用于找到让损失最小的参数值。</p>
<div class="concept-box">
<h4><i class="fas fa-mountain"></i> 山坡类比</h4>
<p>想象你站在山坡上,目标是到达最低点(山谷):<br/>
• 你看脚下,判断哪个方向最陡(梯度)<br/>
• 沿最陡方向往下走一步(参数更新)<br/>
• 重复:判断方向→走一步→判断方向→走一步<br/>
• 最终到达山谷(最优参数)<br/><br/>
<strong>梯度</strong>就是山坡最陡的方向(函数变化最快的方向)<br/>
<strong>下降</strong>就是沿着这个方向往下走</p>
</div>
<h4>梯度下降的三种方式</h4>
<table class="comparison-table">
<tr>
<th>方式</th>
<th>每次使用的数据</th>
<th>特点</th>
<th>适用场景</th>
</tr>
<tr>
<td><strong>批量梯度下降(BGD)</strong></td>
<td>全部数据</td>
<td>方向准确,但计算慢</td>
<td>数据量小时使用</td>
</tr>
<tr>
<td><strong>随机梯度下降(SGD)</strong></td>
<td>单个样本</td>
<td>快但方向不稳定,易震荡</td>
<td>数据量大时使用</td>
</tr>
<tr>
<td><strong>小批量梯度下降(Mini-batch SGD)</strong></td>
<td>一小批样本(如32个)</td>
<td>平衡速度和稳定性,最常用</td>
<td>实际训练的主流方法</td>
</tr>
</table>
<div class="flow-diagram">
<div class="flow-item">计算梯度<br/>(损失函数对参数的导数)</div>
<span class="flow-arrow">→</span>
<div class="flow-item">确定方向<br/>(梯度负方向)</div>
<span class="flow-arrow">→</span>
<div class="flow-item">更新参数<br/>(参数 -= 学习率 × 梯度)</div>
<span class="flow-arrow">→</span>
<div class="flow-item">重复直到<br/>损失足够小</div>
</div>
<div class="concept-box warning">
<h4><i class="fas fa-lightbulb"></i> 梯度下降的关键公式</h4>
<p>参数更新公式:<br/><br/>
\[ \theta_{\text{new}} = \theta_{\text{old}} - \eta \cdot \nabla L(\theta) \]<br/><br/>
其中:<br/>
• \(\theta\) 是模型参数<br/>
• \(\eta\) 是学习率<br/>
• \(\nabla L(\theta)\) 是损失函数对参数的梯度<br/><br/>
简单理解:<strong>新参数 = 旧参数 - 学习率 × 梯度</strong><br/>
梯度告诉我们"往哪里走能降低损失",学习率告诉我们"走多远"。</p>
</div>
<h4>梯度下降的Python代码示例</h4>
<p>下面用一维函数演示梯度下降的基本过程:</p>
<pre><code class="language-python">import numpy as np
# 定义损失函数: f(x) = x^2 + 2x + 1 = (x+1)^2
# 最小值在 x = -1 处,最小值为 0
def loss_function(x):
return x**2 + 2*x + 1
# 损失函数的导数(梯度)
def gradient(x):
return 2*x + 2
# 梯度下降参数
learning_rate = 0.1 # 学习率
x = 3.0 # 初始值(随机初始化)
epochs = 30 # 迭代次数
print("梯度下降过程:")
for epoch in range(epochs):
grad = gradient(x) # 计算梯度
x = x - learning_rate * grad # 更新参数
loss = loss_function(x)
if epoch % 5 == 0 or epoch == epochs - 1:
print(f" Epoch {epoch:2d}: x = {x:.6f}, loss = {loss:.6f}")
print(f"\n最终结果: x = {x:.6f}, loss = {loss_function(x):.6f}")
# 输出: 最终结果: x = -1.000000, loss = 0.000000</code></pre>
<h4>为什么学习率很重要?</h4>
<p>学习率决定每一步走多远:</p>
<ul>
<li><strong>学习率太大</strong>:一步跨太大,可能跳过最低点,来回震荡,无法收敛</li>
<li><strong>学习率太小</strong>:一步太小,下山太慢,训练时间很长</li>
<li><strong>合适的学习率</strong>:稳定下降,较快到达最优</li>
</ul>
<div class="concept-box success">
<h4><i class="fas fa-chart-line"></i> 学习率调优技巧</h4>
<p>• 初始值通常:0.001(Adam默认)、0.01(SGD默认)<br/>
• 观察训练曲线:损失震荡→学习率太大;损失下降慢→学习率太小<br/>
• 可以动态调整:训练前期大学习率(快速下降),后期小学习率(精细调整)<br/>
• 常用策略:学习率衰减、余弦退火</p>
</div>
<h4>6. 反向传播(Backpropagation)补充</h4>
<p><span class="keyword-highlight">反向传播</span>是计算梯度的核心技术。它从输出层向输入层逐层计算每个参数对损失的影响。</p>
<div class="concept-box">
<h4><i class="fas fa-undo"></i> 为什么叫"反向"?</h4>
<p><strong>前向传播</strong>:数据从输入→隐藏层→输出(计算预测值)<br/>
<strong>反向传播</strong>:误差从输出→隐藏层→输入(计算梯度)<br/><br/>
因为梯度计算是从输出层开始的,沿着网络结构"反向"传播误差信息,告诉每层"你哪里做错了,该怎么调整"。这就是神经网络的"自我纠错"过程。</p>
</div>
<h3 id="sub2-5">训练的常见问题</h3>
<table class="comparison-table">
<tr>
<th>问题</th>
<th>现象</th>
<th>原因</th>
<th>解决方法</th>
</tr>
<tr>
<td><strong>过拟合(Overfitting)</strong></td>
<td>训练数据表现好,新数据表现差</td>
<td>模型太复杂,"背熟"了训练数据</td>
<td>更多数据、正则化、Dropout、早停</td>
</tr>
<tr>
<td><strong>欠拟合(Underfitting)</strong></td>
<td>训练数据和新数据都表现差</td>
<td>模型太简单,无法学习数据规律</td>
<td>增加模型复杂度、更多训练时间</td>
</tr>
<tr>
<td><strong>梯度消失</strong></td>
<td>深层网络底层参数几乎不更新</td>
<td>多层网络中梯度逐层衰减</td>
<td>ReLU激活函数、Batch Normalization、残差连接</td>
</tr>
<tr>
<td><strong>梯度爆炸</strong></td>
<td>梯度值变得极大,参数更新不稳定</td>
<td>梯度在反向传播中逐层放大</td>
<td>梯度裁剪、合适的初始化方法</td>
</tr>
</table>
</div>
<div class="concept-section video-section">
<h2 id="sec3"><i class="fas fa-play-circle"></i> 推荐视频</h2>
<p>如果你觉得文字讲解不够直观,推荐观看以下视频:</p>
<div class="video-card">
<div class="video-icon"><i class="fab fa-bilibili"></i></div>
<div class="video-info">
<h4>反向传播</h4>
<p class="video-author">作者:3Blue1Brown</p>
<p class="video-desc">为什么推荐:动画演示反向传播算法</p>
<a href="https://www.bilibili.com/video/BV1bx411M7ZL" target="_blank" class="video-link">
<i class="fas fa-external-link-alt"></i> 点击观看
</a>
</div>
</div>
</div>
<div class="ai-box ai-box--summary" id="summary">
<h3 id="sub3-6"><i class="fas fa-clipboard-list"></i> 本章小结</h3>
<ol>
<li>训练是通过反复前向传播和反向传播来调整模型参数,使损失函数最小化的过程。</li>
<li>损失函数衡量预测与真实的差距:回归任务用MSE,分类任务用交叉熵。</li>
<li>梯度下降是参数更新的核心算法,公式为 \(\theta_{\text{new}} = \theta_{\text{old}} - \eta \cdot \nabla L(\theta)\)。</li>
<li>学习率、Batch Size和Epoch是影响训练效果的关键超参数,需要根据具体任务调优。</li>
<li>常见训练问题包括过拟合(模型太复杂)、欠拟合(模型太简单)和梯度消失/爆炸(深层网络问题)。</li>
</ol>
</div>
<div class="ai-box ai-box--exercise" id="exercises">
<h3 id="sub3-7"><i class="fas fa-pencil-alt"></i> 练习题</h3>
<ol>
<li>
<p><strong>在梯度下降中,如果学习率设置过大,最可能出现什么问题?</strong></p>
<p>A. 训练速度太慢<br/>B. 损失函数来回震荡,无法收敛<br/>C. 模型欠拟合<br/>D. 梯度消失</p>
<p><strong>答案:B</strong>。学习率太大会导致每步跨距过大,在最优点附近来回震荡,无法收敛到最小值。</p>
</li>
<li>
<p><strong>以下哪个公式正确表达了梯度下降的参数更新规则?</strong></p>
<p>A. \(\theta_{\text{new}} = \theta_{\text{old}} + \eta \cdot \nabla L\)<br/>B. \(\theta_{\text{new}} = \theta_{\text{old}} - \eta \cdot \nabla L\)<br/>C. \(\theta_{\text{new}} = \theta_{\text{old}} \times \eta \cdot \nabla L\)<br/>D. \(\theta_{\text{new}} = \eta \cdot \nabla L\)</p>
<p><strong>答案:B</strong>。梯度下降沿梯度的负方向更新参数,即减去学习率乘以梯度。</p>
</li>
<li>
<p><strong>模型在训练集上准确率99%,但在测试集上只有60%,这属于什么问题?</strong></p>
<p>A. 欠拟合<br/>B. 过拟合<br/>C. 梯度消失<br/>D. 学习率太大</p>
<p><strong>答案:B</strong>。训练集表现好但测试集表现差是典型的过拟合现象,模型"背熟"了训练数据但无法泛化到新数据。</p>
</li>
</ol>
</div>
<!-- ============================================================ -->
</main>
</div>
<!-- ==================== 章节底部导航 ==================== -->
<nav class="chapter-nav-bottom" style="background: #f7fafc; border-top: 1px solid #e2e8f0; padding: 2rem; margin-top: 3rem;">
<div style="max-width: 900px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;">
<a href="ch06.html" class="prev-chapter" style="color: #4299e1; font-size: 1rem; padding: 0.75rem 1.5rem; border: 2px solid #4299e1; border-radius: 8px; transition: all 0.3s;">
<i class="fas fa-arrow-left"></i> 上一章
</a>
<span style="color: #718096; font-size: 0.9rem;">第七章:训练</span>
<a href="ch08.html" class="next-chapter" style="color: #4299e1; font-size: 1rem; padding: 0.75rem 1.5rem; border: 2px solid #4299e1; border-radius: 8px; transition: all 0.3s;">
下一章 <i class="fas fa-arrow-right"></i>
</a>
</div>
</nav>
<!-- ==================== 页脚 ==================== -->
<footer class="footer">
<div class="footer-content">
<div class="footer-section">
<h3 id="sub3-8"><i class="fas fa-graduation-cap"></i> AI学习笔记</h3>
<p>从零开始系统学习人工智能</p>
<p>涵盖前置基础、核心原理、工程实践、应用工具、进阶展望</p>
</div>
<div class="footer-section">
<h3 id="sub3-9"><i class="fas fa-bookmark"></i> 内容导航</h3>
<p><a href="ch06.html" style="color: rgba(255,255,255,0.9);">第六章:模型</a></p>
<p><a href="ch07.html" style="color: rgba(255,255,255,0.9);">第七章:训练</a></p>
<p><a href="ch08.html" style="color: rgba(255,255,255,0.9);">第八章:模型评估与调优</a></p>
<p><a href="ch09.html" style="color: rgba(255,255,255,0.9);">第九章:CNN</a></p>
<p><a href="ch10.html" style="color: rgba(255,255,255,0.9);">第十章:Transformer</a></p>
</div>
<div class="footer-section">
<h3 id="sub3-10"><i class="fas fa-info-circle"></i> 说明</h3>
<p>本笔记仅供学习参考,内容如有错误欢迎指正。</p>
<p>AI技术发展迅速,部分信息可能随时间变化。</p>
</div>
</div>
<div class="footer-bottom">
<p>AI学习笔记 © 2024 | 持续更新中</p>
</div>
</footer>
<!-- Scripts -->
<script src="../../js/mobile-menu.js"></script>
<script src="../../js/dark-mode.js"></script>
<script src="assets/ai-notes.js"></script>
</body>
</html>