sync(latex): 从 Word 同步第二章和附录内容

- ch02: 第5节重写为"环境-智能体框架",新增表2.1/2.2和图2.1
- ch01: 补充 Garrity 引用来源
- 全部附录(ap01-ap09)从 Word 重新转换,修复 \sub 等转换错误
- 新增 ch13 结语占位、上下篇分隔页

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-29 15:13:27 +08:00
parent 491ba89892
commit c55f956656
16 changed files with 1414 additions and 1273 deletions
+2 -2
View File
@@ -1,2 +1,2 @@
\chapter{附录}
\chapter*{附录}
\addcontentsline{toc}{chapter}{附录}
+197 -207
View File
@@ -1,18 +1,18 @@
\chapter{附录1计算机基础与编程环境}
\chapter{计算机基础与编程环境}
本附录介绍计算机的基本构成、操作系统常见操作、程序设计语言的概念、Python编程语言的系统学习指南,以及机器学习与深度学习的实践入门。
\subsubsection{计算机的基本构成与操作系统常见操作}
\subsection{计算机的基本构成与操作系统常见操作}
\paragraph{计算机基本构成}
\subsubsection{计算机基本构成}
了解计算机的基本组成有助于理解AI程序运行时的资源需求。
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2194}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2599}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3778}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2368}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3026}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.4342}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
组件
@@ -33,11 +33,12 @@ GPU & 图形处理器,并行计算 & 深度学习训练与推理的核心硬
\end{longtable}
}
\paragraph{操作系统常见操作}
\subsubsection{操作系统常见操作}
本书以 macOS/Linux 为主要环境,Windows 用户推荐使用 WSL2Windows Subsystem for Linux)。
本书以 macOS/Linux 为主要环境,Windows 用户推荐使用 WSL2Windows
Subsystem for Linux)。
\subparagraph{文件与目录操作:}
\paragraph{文件与目录操作:}
\emph{\# 查看当前路径}\\
pwd\\
@@ -56,7 +57,7 @@ cp file.txt backup.txt\\
mv old.txt new.txt\\
rm unwanted.txt
\subparagraph{环境与进程管理:}
\paragraph{环境与进程管理:}
\emph{\# 查看系统资源}\\
top \emph{\# CPU和内存使用}\\
@@ -67,17 +68,18 @@ nvidia-smi \emph{\# GPU状态(NVIDIA显卡)}\\
brew install xxx \emph{\# macOS Homebrew}\\
apt install xxx \emph{\# Ubuntu/Debian}
\paragraph{硬件资源推荐}
\subsubsection{硬件资源推荐}
\textbf{本地GPU配置} - GPURTX 3060 (12GB) 或更高 - 内存:16GB+ - 存储:至少100GB SSD
\textbf{本地GPU配置} - GPURTX 3060 (12GB) 或更高 - 内存:16GB+ -
存储:至少100GB SSD
\textbf{云平台}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2003}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1245}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1185}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2639}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1528}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1528}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
平台
@@ -97,9 +99,11 @@ AutoDL & 按时计费 & 中期项目 \\
\end{longtable}
}
\paragraph{软件安装与运行}
\subsubsection{软件安装与运行}
\textbf{“安装”的本质就是}:把编译好的二进制文件放到 PATH 某个目录下,让 shell 能找到它。例如git的安装和使用: \textbf{总结:三层抽象}
\textbf{``安装''的本质就是}:把编译好的二进制文件放到 PATH
某个目录下,让 shell 能找到它。例如git的安装和使用:
\textbf{总结:三层抽象}
┌─────────────────────────────────────────────┐\\
│ 用户层:brew install git / git clone │ ← 你看到的\\
@@ -111,23 +115,26 @@ AutoDL & 按时计费 & 中期项目 \\
│ 硬件层:CPU 执行指令、网卡收发数据、磁盘写入 │ ← 物理上发生了什么\\
└─────────────────────────────────────────────┘
所以整个链条是:\textbf{包管理器下载编译好的二进制 → 放到 PATH 目录 → shell 通过 PATH 找到它 → execve 加载到内存 →}
所以整个链条是:\textbf{包管理器下载编译好的二进制 → 放到 PATH 目录 →
shell 通过 PATH 找到它 → execve 加载到内存 →}
\textbf{二进制内部调用 OS API 完成实际工作}。没有任何“魔法”,本质上就是文件操作和进程管理的组合。
\textbf{二进制内部调用 OS API
完成实际工作}。没有任何“魔法”,本质上就是文件操作和进程管理的组合。
\subsubsection{程序设计语言与软件开发}
\subsection{程序设计语言与软件开发}
\paragraph{什么是程序设计语言}
\subsubsection{什么是程序设计语言}
计算机只能执行由0和1组成的\textbf{机器码}machine code),但人类直接阅读和编写机器码极其困难。程序设计语言就是人与计算机之间的桥梁------用人类可读的语法表达逻辑,再通过特定工具转换为机器可执行的指令。
计算机只能执行由0和1组成的\textbf{机器码}machine
code),但人类直接阅读和编写机器码极其困难。程序设计语言就是人与计算机之间的桥梁——用人类可读的语法表达逻辑,再通过特定工具转换为机器可执行的指令。
从底层到高层的演进:
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1185}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2548}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.4249}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1429}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3506}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.4805}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
层级
@@ -147,7 +154,7 @@ AutoDL & 按时计费 & 中期项目 \\
\end{longtable}
}
\paragraph{编译型与解释型语言}
\subsubsection{编译型与解释型语言}
高级语言需要转换为机器码才能运行,根据转换方式的不同,分为两大类:
@@ -175,16 +182,17 @@ RubyWeb开发(Ruby on Rails
特点:开发灵活、调试方便,但运行速度通常慢于编译型语言。
\textbf{混合模式}Java 采用“编译为字节码 → 虚拟机解释执行”的混合方式,兼顾了跨平台和性能。
\textbf{混合模式}Java 采用“编译为字节码 →
虚拟机解释执行”的混合方式,兼顾了跨平台和性能。
\paragraph{常见编程语言概览}
\subsubsection{常见编程语言概览}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1266}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.0951}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3546}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3258}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1512}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1047}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3605}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3605}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
语言
@@ -200,7 +208,8 @@ RubyWeb开发(Ruby on Rails
\bottomrule\noalign{}
\endlastfoot
Python & 解释型 & AI、数据科学、自动化 & 本书主要编程语言 \\
C/C++ & 编译型 & 操作系统、嵌入式、高性能计算 & 深度学习框架的底层实现 \\
C/C++ & 编译型 & 操作系统、嵌入式、高性能计算 &
深度学习框架的底层实现 \\
Java & 混合型 & 企业应用、Android开发 & 大数据处理(Hadoop/Spark \\
JavaScript & 解释型 & 网页前端、Node.js后端 & Web可视化、交互设计 \\
Shell/Bash & 解释型 & 命令行脚本、系统管理 & 自动化任务、环境管理 \\
@@ -208,15 +217,19 @@ SQL & 声明式 & 数据库查询 & 数据管理与提取 \\
\end{longtable}
}
\textbf{命令行界面(CLI}CLICommand Line Interface)是通过文本命令与计算机交互的方式。终端中输入的每一条命令(如 ls、git commit)本质上都是调用某个程序。掌握 CLI 是进行AI开发的基础技能,许多工具(如 conda、pip、git)主要通过命令行操作。
\textbf{命令行界面(CLI}CLICommand Line
Interface)是通过文本命令与计算机交互的方式。终端中输入的每一条命令(如
ls、git commit)本质上都是调用某个程序。掌握 CLI
是进行AI开发的基础技能,许多工具(如
conda、pip、git)主要通过命令行操作。
\paragraph{软件开发基本概念}
\subsubsection{软件开发基本概念}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1379}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3042}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.5579}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1327}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3186}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.5310}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
概念
@@ -229,18 +242,21 @@ SQL & 声明式 & 数据库查询 & 数据管理与提取 \\
\endhead
\bottomrule\noalign{}
\endlastfoot
集成开发环境 & IDE & 集成代码编辑、调试、运行的开发工具(如 VS Code、PyCharm \\
集成开发环境 & IDE & 集成代码编辑、调试、运行的开发工具(如 VS
Code、PyCharm \\
编译器 & Compiler & 将源代码翻译为机器码的程序 \\
解释器 & Interpreter & 逐行读取并执行源代码的程序 \\
调试器 & Debugger & 帮助定位和修复代码错误的工具 \\
包管理器 & Package Manager & 管理第三方库的安装和更新(如 pip、conda、npm \\
API & Application Programming Interface & 程序之间交互的接口(如调用AI模型的API \\
包管理器 & Package Manager & 管理第三方库的安装和更新(如
pip、conda、npm \\
API & Application Programming Interface &
程序之间交互的接口(如调用AI模型的API) \\
开源 & Open Source & 源代码公开,可自由使用和修改 \\
版本控制 & Version Control & 管理代码的修改历史(如 Git \\
\end{longtable}
}
\paragraph{Python环境配置}\label{pythonux73afux5883ux914dux7f6e}
\subsubsection{Python环境配置}
Python是本书使用的核心编程语言,以下介绍环境搭建方法。
@@ -248,10 +264,10 @@ Anaconda vs Miniconda
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1265}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1092}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1422}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1599}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1165}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.0971}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1262}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.6408}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
工具
@@ -266,8 +282,10 @@ Anaconda vs Miniconda
\endhead
\bottomrule\noalign{}
\endlastfoot
Anaconda & \textasciitilde500MB & 预装常用库 & \href{https://www.anaconda.com/download}{anaconda.com} \\
Miniconda & \textasciitilde50MB & 精简安装 & \href{https://docs.conda.io/en/latest/miniconda.html}{docs.conda.io} \\
Anaconda & \textasciitilde500MB & 预装常用库 &
\href{https://www.anaconda.com/download}{anaconda.com} \\
Miniconda & \textasciitilde50MB & 精简安装 &
\href{https://docs.conda.io/en/latest/miniconda.html}{docs.conda.io} \\
\end{longtable}
}
@@ -285,15 +303,18 @@ conda install numpy pandas scipy\\
\# 4. 安装深度学习框架\\
pip install torch torchvision
\subsubsection{Python编程语言}\label{pythonux7f16ux7a0bux8bedux8a00}
\subsection{Python编程语言}
\subparagraph{Python概述与特点}\label{pythonux6982ux8ff0ux4e0eux7279ux70b9}
\paragraph{Python概述与特点}
Python由Guido van Rossum于1991年发布,以”优雅”\,”简洁”\,”可读性强”为设计哲学。它是当前AI和数据科学领域使用最广泛的编程语言。
Python由Guido van
Rossum于1991年发布,以“优雅”\,``简洁“``可读性强”为设计哲学。它是当前AI和数据科学领域使用最广泛的编程语言。
\textbf{核心特点}: - 语法简洁,接近自然语言,入门门槛低 - 丰富的第三方库生态(AI、数据处理、Web等) - 跨平台运行(Windows、macOS、Linux - 活跃的开源社区支持
\textbf{核心特点}: - 语法简洁,接近自然语言,入门门槛低 -
丰富的第三方库生态(AI、数据处理、Web等) -
跨平台运行(Windows、macOS、Linux - 活跃的开源社区支持
\subparagraph{基础语法}
\paragraph{基础语法}
变量与数据类型
@@ -304,7 +325,8 @@ chapter\_count = 26 \emph{\# 整数 int}\\
is\_published = True \emph{\# 布尔值 bool}\\
\strut \\
\emph{\# 查看类型}\\
print(type(name)) \emph{\# \textless class \textquotesingle str\textquotesingle\textgreater{}}
print(type(name)) \emph{\# \textless class
\textquotesingle str\textquotesingle\textgreater{}}
字符串操作
@@ -332,7 +354,7 @@ print(len(title)) \emph{\# 长度}
\strut \\
\emph{\# 好的注释解释"为什么",而不是"做什么"}
\subparagraph{数据结构}
\paragraph{数据结构}
列表(List
@@ -387,10 +409,9 @@ rgb = (255, 128, 0)
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
\begin{verbatim}
g, b = rgb
\end{verbatim}
g, b = rgb
\end{enumerate}
集合(Set
@@ -404,7 +425,7 @@ tools\_b = \{"Figma", "Blender", "Rhino"\}\\
print(tools\_a \& tools\_b) \emph{\# 交集: \{"Figma"\}}\\
print(tools\_a \textbar{} tools\_b) \emph{\# 并集}
\subparagraph{控制流}
\paragraph{控制流}
条件判断
@@ -446,9 +467,10 @@ squares.append(x ** 2)\\
squares = {[}x ** 2 \textbf{for} x \textbf{in} range(10){]}\\
\strut \\
\emph{\# 带条件过滤}\\
even\_squares = {[}x ** 2 \textbf{for} x \textbf{in} range(10) \textbf{if} x \% 2 == 0{]}
even\_squares = {[}x ** 2 \textbf{for} x \textbf{in} range(10)
\textbf{if} x \% 2 == 0{]}
\subparagraph{函数与模块}
\paragraph{函数与模块}
定义函数
@@ -484,25 +506,19 @@ train\_model(100, optimizer="SGD", lr=0.1)
\textbf{import} pandas \textbf{as} pd
\begin{verbatim}
\end{verbatim}
\emph{\# 从模块中导入特定功能}
\textbf{from} pathlib \textbf{import} Path
\textbf{from} collections \textbf{import} Counter
\begin{verbatim}
\end{verbatim}
\emph{\# 安装第三方库(在终端中执行)}
\begin{verbatim}
\begin{lstlisting}
# pip install numpy pandas matplotlib
\end{verbatim}
\end{lstlisting}
\subparagraph{3.6 文件读写}
\paragraph{3.6 文件读写}
\emph{\# 读取文件}
@@ -518,9 +534,6 @@ content = f.read()
print(line.strip())
\begin{verbatim}
\end{verbatim}
\emph{\# 写入文件}
\textbf{with} open("output.txt", "w", encoding="utf-8") \textbf{as} f:
@@ -529,46 +542,35 @@ f.write("分析结果\textbackslash n")
f.write(f"准确率: \{acc:.4f\}\textbackslash n")
\begin{verbatim}
\end{verbatim}
\emph{\# 读写JSON(AI应用中常用的数据格式)}
\textbf{import} json
\begin{verbatim}
\end{verbatim}
data = \{"model": "ResNet", "accuracy": 0.96\}
\begin{verbatim}
\end{verbatim}
\emph{\# 写入JSON}
\textbf{with} open("result.json", "w") \textbf{as} f:
json.dump(data, f, indent=2)
\begin{verbatim}
\end{verbatim}
\emph{\# 读取JSON}
\textbf{with} open("result.json", "r") \textbf{as} f:
\begin{verbatim}
\begin{lstlisting}
loaded = json.load(f)
\end{verbatim}
\end{lstlisting}
\subparagraph{面向对象编程基础}
\paragraph{面向对象编程基础}
面向对象编程(OOP)是Python的重要范式,许多AI库都基于OOP设计。
\textbf{class} NeuralNetwork:\\
\emph{"""简单的神经网络类"""}\\
\strut \\
\textbf{def} \_\_init\_\_(self, input\_size, hidden\_size, output\_size):\\
\textbf{def} \_\_init\_\_(self, input\_size, hidden\_size,
output\_size):\\
\emph{"""初始化网络结构"""}\\
self.input\_size = input\_size\\
self.hidden\_size = hidden\_size\\
@@ -578,7 +580,8 @@ self.loss\_history = {[}{]}\\
\textbf{def} forward(self, x):\\
\emph{"""前向传播"""}\\
\emph{\# 这里简化为概念演示}\\
\textbf{return} f"输出: 输入\{x\}经过\{self.hidden\_size\}个隐藏层神经元"\\
\textbf{return} f"输出:
输入\{x\}经过\{self.hidden\_size\}个隐藏层神经元"\\
\strut \\
\textbf{def} train(self, data, epochs=10):\\
\emph{"""训练网络"""}\\
@@ -588,13 +591,14 @@ self.loss\_history.append(loss)\\
print(f"Epoch \{epoch+1\}, Loss: \{loss:.4f\}")\\
\strut \\
\emph{\# 创建实例}\\
model = NeuralNetwork(input\_size=784, hidden\_size=128, output\_size=10)\\
model = NeuralNetwork(input\_size=784, hidden\_size=128,
output\_size=10)\\
\strut \\
\emph{\# 使用}\\
output = model.forward({[}0.5, 0.3, 0.8{]})\\
model.train(data=None, epochs=5)
\paragraph{核心科学计算库}
\subsubsection{核心科学计算库}
NumPy:数值计算基础
@@ -615,7 +619,7 @@ print(np.mean(x)) \emph{\# 均值}\\
print(np.std(x)) \emph{\# 标准差}\\
print(np.max(x)) \emph{\# 最大值}
\subparagraph{Pandas:数据处理}\label{pandasux6570ux636eux5904ux7406}
\paragraph{Pandas:数据处理}
\textbf{import} pandas \textbf{as} pd\\
\strut \\
@@ -634,9 +638,10 @@ df = df.dropna() \emph{\# 删除缺失值}\\
print(df.describe()) \emph{\# 描述性统计}\\
\strut \\
\emph{\# 筛选数据}\\
filtered = df{[}df{[}\textquotesingle accuracy\textquotesingle{]} \textgreater{} 0.9{]}
filtered = df{[}df{[}\textquotesingle accuracy\textquotesingle{]}
\textgreater{} 0.9{]}
\subparagraph{Matplotlib:数据可视化}\label{matplotlibux6570ux636eux53efux89c6ux5316}
\paragraph{Matplotlib:数据可视化}
\textbf{import} matplotlib.pyplot \textbf{as} plt\\
\strut \\
@@ -651,16 +656,16 @@ plt.title(\textquotesingle Training Loss Curve\textquotesingle)\\
plt.savefig(\textquotesingle loss\_curve.png\textquotesingle, dpi=150)\\
plt.show()
\subsubsection{AI工具库速查与模型资源}\label{aiux5de5ux5177ux5e93ux901fux67e5ux4e0eux6a21ux578bux8d44ux6e90}
\subsection{AI工具库速查与模型资源}
\paragraph{工具库速查}
\subsubsection{工具库速查}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1422}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1383}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3840}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3081}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1340}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1443}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.4227}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2784}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
类别
@@ -676,17 +681,22 @@ plt.show()
\bottomrule\noalign{}
\endlastfoot
计算机视觉 & OpenCV & pip install opencv-python & 图像处理、视频分析 \\
目标检测 & Ultralytics & pip install ultralytics & YOLO目标检测、实例分割 \\
图像生成 & Diffusers & pip install diffusers & Stable Diffusion模型调用 \\
Agent开发 & LangChain & pip install langchain langchain-openai & LLM应用开发框架 \\
目标检测 & Ultralytics & pip install ultralytics &
YOLO目标检测、实例分割 \\
图像生成 & Diffusers & pip install diffusers & Stable
Diffusion模型调用 \\
Agent开发 & LangChain & pip install langchain langchain-openai &
LLM应用开发框架 \\
Agent开发 & LangGraph & pip install langgraph & 状态机式Agent开发 \\
数据检索 & LlamaIndex & pip install llama-index & 数据索引与检索(RAG \\
数据检索 & LlamaIndex & pip install llama-index &
数据索引与检索(RAG \\
\end{longtable}
}
\paragraph{模型资源}
\subsubsection{模型资源}
\subparagraph{\texorpdfstring{Hugging Face\href{https://huggingface.co/}{huggingface.co}}{Hugging Facehuggingface.co}}\label{hugging-facehuggingface.co}
\paragraph{\texorpdfstring{Hugging
Face\href{https://huggingface.co/}{huggingface.co}}{Hugging Facehuggingface.co}}\label{hugging-facehuggingface.co}
功能:模型仓库、数据集、Spaces在线演示
@@ -694,9 +704,9 @@ Agent开发 & LangGraph & pip install langgraph & 状态机式Agent开发 \\
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1421}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2163}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3845}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1625}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2750}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.5375}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
任务
@@ -709,24 +719,25 @@ Hugging Face ID
\endhead
\bottomrule\noalign{}
\endlastfoot
文生图 & Stable Diffusion XL & stabilityai/stable-diffusion-xl-base-1.0 \\
文生图 & Stable Diffusion XL &
stabilityai/stable-diffusion-xl-base-1.0 \\
目标检测 & YOLOv8 & Ultralytics \\
语义分割 & SAM & segment-anything \\
大语言模型 & Llama 3 & meta-llama/Meta-Llama-3-8B \\
\end{longtable}
}
\subsubsection{4 机器学习与深度学习入门教程}
\section{机器学习与深度学习入门教程}
本节通过一个完整的实践流程,带领读者从数据准备到模型训练,体验机器学习和深度学习的核心步骤。
\paragraph{机器学习 vs 深度学习}
\subsubsection{机器学习 vs 深度学习}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1185}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.4054}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3778}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1358}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.4198}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.4198}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
维度
@@ -747,15 +758,15 @@ Hugging Face ID
\end{longtable}
}
\paragraph{scikit-learn:机器学习实践}\label{scikit-learnux673aux5668ux5b66ux4e60ux5b9eux8df5}
\subsubsection{scikit-learn:机器学习实践}
scikit-learn是Python最经典的机器学习库,提供了丰富的算法和工具。
\subparagraph{安装}
\paragraph{安装}
pip install scikit-learn
\subparagraph{完整示例:鸢尾花分类}
\paragraph{完整示例:鸢尾花分类}
\textbf{import} numpy \textbf{as} np
@@ -763,7 +774,8 @@ pip install scikit-learn
\textbf{from} sklearn \textbf{import} datasets
\textbf{from} sklearn.model\_selection \textbf{import} train\_test\_split
\textbf{from} sklearn.model\_selection \textbf{import}
train\_test\_split
\textbf{from} sklearn.preprocessing \textbf{import} StandardScaler
@@ -773,9 +785,10 @@ pip install scikit-learn
\textbf{from} sklearn.ensemble \textbf{import} RandomForestClassifier
\textbf{from} sklearn.metrics \textbf{import} accuracy\_score, classification\_report
\textbf{from} sklearn.metrics \textbf{import} accuracy\_score,
classification\_report
\paragraph{}\label{section-6}
\subsubsection{}\label{section}
\emph{\# 1. 加载数据}
@@ -787,22 +800,16 @@ y = iris.target \emph{\# 标签:三种鸢尾花}
print(f"数据集大小: \{X.shape\}, 类别数: \{len(np.unique(y))\}")
\begin{verbatim}
\end{verbatim}
\emph{\# 2. 划分训练集和测试集}
X\_train, X\_test, y\_train, y\_test = train\_test\_split(
\begin{verbatim}
\begin{lstlisting}
X, y, test_size=0.3, random_state=42
\end{verbatim}
\end{lstlisting}
)
\begin{verbatim}
\end{verbatim}
\emph{\# 3. 数据标准化}
scaler = StandardScaler()
@@ -811,9 +818,6 @@ X\_train = scaler.fit\_transform(X\_train)
X\_test = scaler.transform(X\_test)
\begin{verbatim}
\end{verbatim}
\emph{\# 4. 训练多个模型并比较}
models = \{
@@ -826,9 +830,9 @@ models = \{
"随机森林": RandomForestClassifier(n\_estimaors=100),
\end{quote}
\begin{verbatim}
\begin{lstlisting}
}
\end{verbatim}
\end{lstlisting}
\textbf{for} name, model \textbf{in} models.items():
@@ -848,20 +852,21 @@ y\_pred = best\_model.predict(X\_test)
print("\textbackslash n分类报告:")
\begin{verbatim}
\begin{lstlisting}
print(classification_report(y_test, y_pred, target_names=iris.target_names))
\end{verbatim}
\end{lstlisting}
\subparagraph{机器学习工作流总结}
\paragraph{机器学习工作流总结}
数据收集 → 数据预处理 → 特征工程 → 划分训练/测试集\\
→ 选择模型 → 训练 → 评估 → 调优 → 部署
\paragraph{PyTorch:深度学习实践}\label{pytorchux6df1ux5ea6ux5b66ux4e60ux5b9eux8df5}
\subsubsection{PyTorch:深度学习实践}
PyTorch是当前研究和实验中最流行的深度学习框架,以动态计算图和Pythonic API著称。
PyTorch是当前研究和实验中最流行的深度学习框架,以动态计算图和Pythonic
API著称。
\subparagraph{张量(Tensor)基础}
\paragraph{张量(Tensor)基础}
张量是PyTorch的核心数据结构,类似于NumPy数组,但可以在GPU上运算。
@@ -884,7 +889,7 @@ arr = np.array({[}1, 2, 3{]})\\
tensor = torch.from\_numpy(arr) \emph{\# NumPy → Tensor}\\
back = tensor.numpy() \emph{\# Tensor → NumPy}
\subparagraph{自动求导(Autograd}
\paragraph{自动求导(Autograd}
PyTorch的autograd模块可以自动计算梯度,是训练神经网络的核心。
@@ -898,7 +903,7 @@ y = x ** 2 + 3 * x + 1 \emph{\# y = x² + 3x + 1}\\
y.backward()\\
print(f"dy/dx = \{x.grad\}") \emph{\# 应为 2x + 3 = 7x=2时)}
\subparagraph{完整示例:手写数字识别}
\paragraph{完整示例:手写数字识别}
以下是一个完整的神经网络训练流程,使用经典的MNIST数据集。
@@ -910,33 +915,31 @@ print(f"dy/dx = \{x.grad\}") \emph{\# 应为 2x + 3 = 7x=2时)}
\textbf{from} torchvision \textbf{import} datasets, transforms
\subparagraph{}\label{section-7}
\paragraph{}\label{section-4}
\emph{\# 1. 数据准备}
transform = transforms.Compose({[}
\begin{verbatim}
\begin{lstlisting}
transforms.ToTensor(), # 转为张量
\end{verbatim}
\end{lstlisting}
transforms.Normalize((0.1307,), (0.3081,)) \emph{\# 标准化}
{]})
train\_dataset = datasets.MNIST(\textquotesingle./data\textquotesingle, train=True, download=True, transform=transform)
train\_dataset = datasets.MNIST(\textquotesingle./data\textquotesingle,
train=True, download=True, transform=transform)
test\_dataset = datasets.MNIST(\textquotesingle./data\textquotesingle, train=False, transform=transform)
test\_dataset = datasets.MNIST(\textquotesingle./data\textquotesingle,
train=False, transform=transform)
\begin{verbatim}
\end{verbatim}
train\_loader = torch.utils.data.DataLoader(train\_dataset,
batch\_size=64, shuffle=True)
train\_loader = torch.utils.data.DataLoader(train\_dataset, batch\_size=64, shuffle=True)
test\_loader = torch.utils.data.DataLoader(test\_dataset, batch\_size=1000)
\begin{verbatim}
\end{verbatim}
test\_loader = torch.utils.data.DataLoader(test\_dataset,
batch\_size=1000)
\emph{\# 2. 定义模型}
@@ -952,42 +955,30 @@ self.fc2 = nn.Linear(128, 64) \emph{\# 隐藏层 → 隐藏层}
self.fc3 = nn.Linear(64, 10) \emph{\# 隐藏层 → 输出层(10个数字)}
\begin{verbatim}
\end{verbatim}
\textbf{def} forward(self, x):
\begin{verbatim}
\begin{lstlisting}
x = x.view(-1, 28 * 28) # 展平图像
\end{verbatim}
\end{lstlisting}
x = torch.relu(self.fc1(x)) \emph{\# ReLU激活}
x = torch.relu(self.fc2(x))
\begin{verbatim}
\begin{lstlisting}
x = self.fc3(x) # 输出层不加激活
\end{verbatim}
\end{lstlisting}
\textbf{return} x
\begin{verbatim}
\end{verbatim}
model = Net()
\begin{verbatim}
\end{verbatim}
\emph{\# 3. 定义损失函数和优化器}
criterion = nn.CrossEntropyLoss()
optimizer = optim.Adam(model.parameters(), lr=0.001)
\begin{verbatim}
\end{verbatim}
\emph{\# 4. 训练}
\textbf{for} epoch \textbf{in} range(5):
@@ -998,25 +989,26 @@ total\_loss = 0
\textbf{for} batch\_x, batch\_y \textbf{in} train\_loader:
\begin{verbatim}
\begin{lstlisting}
optimizer.zero_grad() # 清零梯度
output = model(batch_x) # 前向传播
\end{verbatim}
\end{lstlisting}
loss = criterion(output, batch\_y) \emph{\# 计算损失}
\begin{verbatim}
\begin{lstlisting}
loss.backward() # 反向传播
optimizer.step() # 更新参数
\end{verbatim}
\end{lstlisting}
total\_loss += loss.item()
print(f"Epoch \{epoch+1\}, Loss: \{total\_loss/len(train\_loader):.4f\}")
print(f"Epoch \{epoch+1\}, Loss:
\{total\_loss/len(train\_loader):.4f\}")
\begin{verbatim}
\begin{lstlisting}
# 5. 测试
\end{verbatim}
\end{lstlisting}
model.eval()
@@ -1036,12 +1028,11 @@ total += batch\_y.size(0)
correct += (predicted == batch\_y).sum()
\begin{verbatim}
\begin{lstlisting}
print(f"\n测试准确率: {correct/total:.2%}")
\end{verbatim}
\end{lstlisting}
\paragraph{使用预训练模型}
\subsubsection{使用预训练模型}
在实际应用中,通常不需要从头训练模型,而是使用预训练模型进行微调或直接推理。
@@ -1055,37 +1046,32 @@ print(f"\n测试准确率: {correct/total:.2%}")
classifier = pipeline("sentiment-analysis")\\
result = classifier("This design is amazing!")\\
print(result)\\
\emph{\# {[}\{\textquotesingle label\textquotesingle: \textquotesingle POSITIVE\textquotesingle, \textquotesingle score\textquotesingle: 0.9998\}{]}}\\
\emph{\# {[}\{\textquotesingle label\textquotesingle:
\textquotesingle POSITIVE\textquotesingle,
\textquotesingle score\textquotesingle: 0.9998\}{]}}\\
\strut \\
\emph{\# 图像分类}\\
image\_classifier = pipeline("image-classification")\\
result = image\_classifier("building.jpg")\\
print(result)\\
\emph{\# {[}\{\textquotesingle score\textquotesingle: 0.92, \textquotesingle label\textquotesingle: \textquotesingle palace\textquotesingle\}, ...{]}}
\emph{\# {[}\{\textquotesingle score\textquotesingle: 0.92,
\textquotesingle label\textquotesingle:
\textquotesingle palace\textquotesingle\}, ...{]}}
\subparagraph{使用Ultralytics YOLO}
\paragraph{使用Ultralytics YOLO}
\emph{\# 安装: pip install ultralytics}
\textbf{from} ultralytics \textbf{import} YOLO
\begin{verbatim}
\end{verbatim}
\emph{\# 加载预训练模型}
model = YOLO("yolov8n.pt")
\begin{verbatim}
\end{verbatim}
\emph{\# 目标检测}
results = model("street\_photo.jpg")
\begin{verbatim}
\end{verbatim}
\emph{\# 查看结果}
\textbf{for} result \textbf{in} results:
@@ -1100,16 +1086,17 @@ conf = float(box.conf{[}0{]})
label = model.names{[}cls{]}
\begin{verbatim}
\begin{lstlisting}
print(f"检测到: {label}, 置信度: {conf:.2f}")
\end{verbatim}
\end{lstlisting}
\paragraph{GPU加速}\label{gpuux52a0ux901f}
\subsubsection{GPU加速}
深度学习训练在GPU上可以快数十倍。PyTorch的GPU使用非常简洁:
\emph{\# 检查GPU是否可用}\\
device = torch.device("cuda" \textbf{if} torch.cuda.is\_available() \textbf{else} "cpu")\\
device = torch.device("cuda" \textbf{if} torch.cuda.is\_available()
\textbf{else} "cpu")\\
print(f"使用设备: \{device\}")\\
\strut \\
\emph{\# 将模型和数据移动到GPU}\\
@@ -1121,15 +1108,17 @@ batch\_x = batch\_x.to(device)\\
batch\_y = batch\_y.to(device)\\
\emph{\# ... 后续训练代码不变}
在没有本地GPU的情况下,可以使用 \href{https://colab.research.google.com/}{Google Colab} 免费使用云端GPU运行上述代码。
在没有本地GPU的情况下,可以使用
\href{https://colab.research.google.com/}{Google Colab}
免费使用云端GPU运行上述代码。
\paragraph{学习路径建议}
\subsubsection{学习路径建议}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1657}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3204}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2490}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1327}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2478}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.6018}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
阶段
@@ -1143,12 +1132,13 @@ batch\_y = batch\_y.to(device)\\
\bottomrule\noalign{}
\endlastfoot
入门 & Python基础 + NumPy/Pandas & 本附录 §3 \\
机器学习 & scikit-learn实践 & \href{https://scikit-learn.org/stable/tutorial/}{scikit-learn官方教程} \\
深度学习基础 & PyTorch入门 + MLP & \href{https://pytorch.org/tutorials/}{PyTorch官方教程} \\
机器学习 & scikit-learn实践 &
\href{https://scikit-learn.org/stable/tutorial/}{scikit-learn官方教程} \\
深度学习基础 & PyTorch入门 + MLP &
\href{https://pytorch.org/tutorials/}{PyTorch官方教程} \\
计算机视觉 & CNN + 图像分类/检测 & 本书第三篇 + CS231n \\
自然语言处理 & Transformer + LLM & 本书第四篇 + CS224n \\
生成式AI & Diffusion + AIGC工具 & 本书第五篇 \\
前沿探索 & Agent + 具身智能 & 本书第六篇 \\
\end{longtable}
}
+136 -99
View File
@@ -1,26 +1,29 @@
\chapter{附录2Vibe Coding与工具链}
\chapter{Vibe Coding与工具链}
本附录介绍Vibe Coding的概念与实践,以及VsCode、Claude Code、Markdown/Obsidian、Git/GitHub等核心工具的使用方法。
本附录介绍Vibe Coding的概念与实践,以及VsCode、Claude
Code、Markdown/Obsidian、Git/GitHub等核心工具的使用方法。
\subsubsection{Vibe Coding的概念与工具}\label{vibe-codingux7684ux6982ux5ff5ux4e0eux5de5ux5177}
\section{Vibe Coding的概念与工具}
\paragraph{什么是Vibe Coding}
\subsubsection{什么是Vibe Coding}
传统编程:\textbf{明确需求 → 设计算法 → 编写代码}
Vibe Coding\textbf{模糊想法 → AI辅助 → 迭代完善}
Vibe Coding是一种以AI为核心的编程新模式:开发者用自然语言描述意图,AI生成代码,再通过迭代对话逐步完善。对于编程经验较少的设计专业读者而言,这种模式大幅降低了技术门槛------不需要记住语法细节,只需要清楚地表达“想要什么”。
Vibe
Coding是一种以AI为核心的编程新模式:开发者用自然语言描述意图,AI生成代码,再通过迭代对话逐步完善。对于编程经验较少的设计专业读者而言,这种模式大幅降低了技术门槛——不需要记住语法细节,只需要清楚地表达“想要什么”。
\paragraph{工作流程}
\subsubsection{工作流程}
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
\textbf{描述意图}:用自然语言说明需求
\end{enumerate}
帮我创建一个简单的图像分类模型
``帮我创建一个简单的图像分类模型''
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
@@ -33,21 +36,22 @@ Vibe Coding是一种以AI为核心的编程新模式:开发者用自然语言
\textbf{迭代优化}:通过对话逐步改进
\end{enumerate}
把隐藏层改成128个神经元
``把隐藏层改成128个神经元''
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{4}
\tightlist
\item
\textbf{理解学习}:阅读AI生成的代码,理解实现原理
\end{enumerate}
\paragraph{实践技巧}
\subsubsection{实践技巧}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.1184}}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.3905}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.1528}}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.4583}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
技巧
@@ -65,14 +69,14 @@ Vibe Coding是一种以AI为核心的编程新模式:开发者用自然语言
\end{longtable}
}
\paragraph{工具生态}
\subsubsection{工具生态}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1982}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1475}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2970}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2366}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2375}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1625}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3125}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2625}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
工具
@@ -95,13 +99,14 @@ Replit Agent & 在线平台 & 端到端开发 & 小型项目、学习实验 \\
\end{longtable}
}
\subsubsection{Claude Code简介与使用}\label{claude-codeux7b80ux4ecbux4e0eux4f7fux7528}
\section{Claude Code简介与使用}
\paragraph{什么是Claude Code}
\subsubsection{什么是Claude Code}
Claude Code是Anthropic推出的命令行AI编程工具(CLI),能够直接在终端中理解项目上下文、读写文件、执行命令,实现端到端的AI辅助开发。它也提供VSCode扩展,可以在编辑器中无缝使用。
Claude
Code是Anthropic推出的命令行AI编程工具(CLI),能够直接在终端中理解项目上下文、读写文件、执行命令,实现端到端的AI辅助开发。它也提供VSCode扩展,可以在编辑器中无缝使用。
\paragraph{安装与配置}
\subsubsection{安装与配置}
\emph{\# 安装(需要 Node.js 18+}\\
npm install -g @anthropic-ai/claude-code\\
@@ -112,24 +117,29 @@ claude
启动后进入交互式对话界面,直接用自然语言描述需求即可。
\paragraph{核心使用方式}
\subsubsection{核心使用方式}
\textbf{对话式开发}:用自然语言描述任务,Claude Code会自动读取相关文件、编写代码、执行测试。
\textbf{对话式开发}:用自然语言描述任务,Claude
Code会自动读取相关文件、编写代码、执行测试。
\textgreater{} 帮我创建一个数据预处理的Python脚本,读取CSV文件并清洗缺失值
\textgreater{}
帮我创建一个数据预处理的Python脚本,读取CSV文件并清洗缺失值
\textbf{文件操作}Claude Code可以直接读取、创建和编辑项目中的文件,每次修改前会征得确认。
\textbf{文件操作}Claude
Code可以直接读取、创建和编辑项目中的文件,每次修改前会征得确认。
\textbf{命令执行}:可以请求Claude Code运行终端命令,如安装依赖、运行脚本等。
\textbf{命令执行}:可以请求Claude
Code运行终端命令,如安装依赖、运行脚本等。
\paragraph{VSCode中的Claude Code}\label{vscodeux4e2dux7684claude-code}
\subsubsection{VSCode中的Claude
Code}
Claude Code提供VSCode扩展,在编辑器中获得同样的AI辅助能力:
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\item
在VSCode扩展商店搜索 ``Claude Code'' 并安装
在VSCode扩展商店搜索 ``Claude Code 并安装
\item
打开项目文件夹
\item
@@ -138,9 +148,10 @@ Claude Code提供VSCode扩展,在编辑器中获得同样的AI辅助能力:
在编辑器中选中代码后,可以直接向Claude提问或请求修改
\end{enumerate}
\textbf{常用场景} - 选中一段代码,请求解释这段代码” - 选中函数,请求“添加错误处理” - 在Claude面板中输入“帮我写单元测试”
\textbf{常用场景} - 选中一段代码,请求解释这段代码“ -
选中函数,请求”添加错误处理” - 在Claude面板中输入”帮我写单元测试”
\paragraph{典型项目工作流}
\subsubsection{典型项目工作流}
\textbf{推荐项目结构}
@@ -154,7 +165,7 @@ project/\\
├── requirements.txt \# 依赖列表\\
└── README.md \# 项目说明
\subparagraph{开发流程:}
\paragraph{开发流程:}
\emph{\# 1. 创建环境}\\
conda create -n myproject python=3.10\\
@@ -169,15 +180,15 @@ claude\\
\emph{\# 4. 保存环境}\\
conda env export \textgreater{} environment.yml
\subsubsection{Markdown语法及Obsidian工具}\label{markdownux8bedux6cd5ux53caobsidianux5de5ux5177}
\subsection{Markdown语法及Obsidian工具}
\paragraph{Markdown简介}\label{markdownux7b80ux4ecb}
\subsubsection{Markdown简介}
Markdown是一种轻量级标记语言,用纯文本格式编写文档,可以方便地转换为HTML、PDF等格式。它的语法简洁直观,是技术文档、笔记、学术写作的常用工具。
本书全部内容即使用Markdown编写。
\paragraph{基础语法}
\subsubsection{基础语法}
\textbf{标题}
@@ -189,9 +200,13 @@ Markdown是一种轻量级标记语言,用纯文本格式编写文档,可以
\textbf{文本格式}
*斜体* **加粗** ***粗斜体*** \textasciitilde\textasciitilde 删除线\textasciitilde\textasciitilde{} \textless{}\textbf{u}\textgreater 下划线\textless/\textbf{u}\textgreater{} \emph{\textbf{`行内代码`}} \textbf{==高亮文本==} \_\_\_分隔线
*斜体* **加粗** ***粗斜体***
\textasciitilde\textasciitilde 删除线\textasciitilde\textasciitilde{}
\textless{}\textbf{u}\textgreater 下划线\textless/\textbf{u}\textgreater{}
\textbf{\emph{`行内代码`}} \textbf{==高亮文本==} \_\_\_分隔线
包含反引号的代码:当代码本身包含反引号时,使用两个反引号包围,使用 `code` 这样的格式
包含反引号的代码:当代码本身包含反引号时,使用两个反引号包围,使用
`code` 这样的格式
\textbf{列表} 列表可以嵌套使用
@@ -201,50 +216,55 @@ Markdown是一种轻量级标记语言,用纯文本格式编写文档,可以
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
有序列表项1
\end{enumerate}
\begin{verbatim}
\begin{lstlisting}
2. 有序列表项2
\end{verbatim}
\end{lstlisting}
- {[} {]} 未完成的任务
\begin{verbatim}
\begin{lstlisting}
- [x] 已完成的任务
\end{verbatim}
\end{lstlisting}
\textbf{链接与图片}
{[}链接文字{]}(https://example.com) \textless!-\/- 行内链接 -\/-\textgreater{}\\
{[}链接文字{]}(https://example.com) \textless!-\/- 行内链接
-\/-\textgreater{}\\
{[}链接文字{]}{[}1{]} \textless!-\/- 参考式链接 -\/-\textgreater{}\\
{[}跳转到基础{]}(\#基础) \textless!-\/- 锚点链接 -\/-\textgreater{}\\
\strut \\
{[}1{]}: https://www.example.com \textless!-\/- 参考链接定义 -\/-\textgreater{}\\
{[}1{]}: https://www.example.com \textless!-\/- 参考链接定义
-\/-\textgreater{}\\
\strut \\
!{[}图片说明{]}(image.png) \textless!-\/- 基本图片 -\/-\textgreater{}\\
*图7.8 路杀动物* \textless!-\/- 图片下方用斜体作为图注 -\/-\textgreater{}\\
*图7.8 路杀动物* \textless!-\/- 图片下方用斜体作为图注
-\/-\textgreater{}\\
\strut \\
\textless!-\/- 图片居中对齐并指定宽度 -\/-\textgreater{}\\
\textless div align="center"\textgreater{}\\
\textless img src="image.png" alt="说明" style="width:10cm;"/\textgreater{}\\
\textless img src="image.png" alt="说明"
style="width:10cm;"/\textgreater{}\\
\textless p\textgreater\textless em\textgreater 图片标题\textless/em\textgreater\textless/p\textgreater{}\\
\textless/div\textgreater{}
\textbf{代码块}
\emph{\textbf{```python}}\\
\textbf{\emph{```python}}\\
print("Hello, World!")\\
\emph{\textbf{```}}
\textbf{\emph{```}}
带行号的代码区块(需要渲染器支持,如 Docusaurus、VuePress):
\emph{\textbf{```javascript linenums="1"}}\\
\emph{\textbf{function greet(name) \{}}\\
\emph{\textbf{console.log(`Hello, \$\{name\}!{\kern0pt}`);}}\\
\emph{\textbf{\}}}\\
\emph{\textbf{```}}
\textbf{\emph{```javascript linenums="1"}}\\
\textbf{\emph{function greet(name) \{}}\\
\textbf{\emph{console.log(`Hello, \$\{name\}!{\kern0pt}`);}}\\
\textbf{\emph{\}}}\\
\textbf{\emph{```}}
表格:
@@ -255,7 +275,8 @@ print("Hello, World!")\\
对齐方式::-\/-\/- 左对齐,:-\/-\/-: 居中,-\/-\/-: 右对齐:
\textbar{} 左对齐 \textbar{} 居中对齐 \textbar{} 右对齐 \textbar{}\\
\textbar{} :-\/-\/-\/-\/- \textbar{} :-\/-\/-\/-\/-\/-: \textbar{} -\/-\/-\/-\/-: \textbar{}\\
\textbar{} :-\/-\/-\/-\/- \textbar{} :-\/-\/-\/-\/-\/-: \textbar{}
-\/-\/-\/-\/-: \textbar{}\\
\textbar{} 内容 \textbar{} 内容 \textbar{} 100 \textbar{}
\textbf{注记}: 输入后在Obsidian编辑器中会自动弹出添加注记模块
@@ -275,63 +296,63 @@ print("Hello, World!")\\
\textgreater{} - 了解项目背景和目标\\
\textgreater{} - 掌握核心功能特性
\subparagraph{图表绘制(Mermaid):}
\paragraph{图表绘制(Mermaid):}
使用 ```mermaid 代码块,部分渲染器(GitHub、Typora、Obsidian)支持:
流程图:
\emph{\textbf{```mermaid}}
\textbf{\emph{```mermaid}}
\emph{\textbf{graph LR}}
\textbf{\emph{graph LR}}
\begin{enumerate}
\def\labelenumi{\Alph{enumi}.}
\item
\emph{\textbf{{[}开始{]} -\/-\textgreater{} B\{条件判断\}}}
\textbf{\emph{{[}开始{]} -\/-\textgreater{} B\{条件判断\}}}
\item
\emph{\textbf{-\/-\textgreater\textbar\textbar{} C{[}执行操作1{]}}}
\textbf{\emph{-\/-\textgreater\textbar\textbar{} C{[}执行操作1{]}}}
\item
\emph{\textbf{-\/-\textgreater\textbar\textbar{} D{[}执行操作2{]}}}
\textbf{\emph{-\/-\textgreater\textbar\textbar{} D{[}执行操作2{]}}}
\item
\emph{\textbf{-\/-\textgreater{} E{[}结束{]}}}
\textbf{\emph{-\/-\textgreater{} E{[}结束{]}}}
\item
\emph{\textbf{-\/-\textgreater{} E}}
\textbf{\emph{-\/-\textgreater{} E}}
\end{enumerate}
\emph{\textbf{```}}
\textbf{\emph{```}}
时序图:
\emph{\textbf{```mermaid}}\\
\emph{\textbf{sequenceDiagram}}\\
\emph{\textbf{participant 用户}}\\
\emph{\textbf{participant 系统}}\\
\emph{\textbf{用户-\textgreater\textgreater 系统: 登录请求}}\\
\emph{\textbf{系统-\/-\textgreater\textgreater 用户: 返回结果}}\\
\emph{\textbf{```}}
\textbf{\emph{```mermaid}}\\
\textbf{\emph{sequenceDiagram}}\\
\textbf{\emph{participant 用户}}\\
\textbf{\emph{participant 系统}}\\
\textbf{\emph{用户-\textgreater\textgreater 系统: 登录请求}}\\
\textbf{\emph{系统-\/-\textgreater\textgreater 用户: 返回结果}}\\
\textbf{\emph{```}}
甘特图:
\emph{\textbf{```mermaid}}\\
\emph{\textbf{gantt}}\\
\emph{\textbf{title 项目计划}}\\
\emph{\textbf{dateFormat YYYY-MM-DD}}\\
\emph{\textbf{section 设计}}\\
\emph{\textbf{需求分析 :done, 2024-01-01, 15d}}\\
\emph{\textbf{section 开发}}\\
\emph{\textbf{编码实现 :active, 2024-01-16, 30d}}\\
\emph{\textbf{```}}
\textbf{\emph{```mermaid}}\\
\textbf{\emph{gantt}}\\
\textbf{\emph{title 项目计划}}\\
\textbf{\emph{dateFormat YYYY-MM-DD}}\\
\textbf{\emph{section 设计}}\\
\textbf{\emph{需求分析 :done, 2024-01-01, 15d}}\\
\textbf{\emph{section 开发}}\\
\textbf{\emph{编码实现 :active, 2024-01-16, 30d}}\\
\textbf{\emph{```}}
饼图:
\emph{\textbf{```mermaid}}\\
\emph{\textbf{pie}}\\
\emph{\textbf{title 市场份额}}\\
\emph{\textbf{"Chrome" : 65}}\\
\emph{\textbf{"Safari" : 15}}\\
\emph{\textbf{"其他" : 20}}\\
\emph{\textbf{```}}
\textbf{\emph{```mermaid}}\\
\textbf{\emph{pie}}\\
\textbf{\emph{title 市场份额}}\\
\textbf{\emph{"Chrome" : 65}}\\
\textbf{\emph{"Safari" : 15}}\\
\textbf{\emph{"其他" : 20}}\\
\textbf{\emph{```}}
\textbf{数学公式}
@@ -355,31 +376,43 @@ a & b \\
c & d
\end{pmatrix}\]
\paragraph{ObsidianMarkdown笔记工具}\label{obsidianmarkdownux7b14ux8bb0ux5de5ux5177}
\subsubsection{ObsidianMarkdown笔记工具}
\href{https://obsidian.md/}{Obsidian} 是一款基于Markdown的知识管理工具,适合构建个人知识库和笔记系统。
\href{https://obsidian.md/}{Obsidian}
是一款基于Markdown的知识管理工具,适合构建个人知识库和笔记系统。
\textbf{核心特性} - \textbf{本地存储}:所有笔记以Markdown文件保存在本地,数据完全自主 - \textbf{双向链接}:用 {[}{[}笔记名{]}{]} 在笔记之间建立链接,形成知识网络 - \textbf{图谱视图}:可视化笔记之间的关联关系 - \textbf{插件生态}:丰富的社区插件扩展功能(如日历、看板、模板等) - \textbf{实时预览}:编辑Markdown时实时渲染效果
\textbf{核心特性} -
\textbf{本地存储}:所有笔记以Markdown文件保存在本地,数据完全自主 -
\textbf{双向链接}:用 {[}{[}笔记名{]}{]}
在笔记之间建立链接,形成知识网络 -
\textbf{图谱视图}:可视化笔记之间的关联关系 -
\textbf{插件生态}:丰富的社区插件扩展功能(如日历、看板、模板等) -
\textbf{实时预览}:编辑Markdown时实时渲染效果
\textbf{使用建议} - 用Obsidian打开本教材的根目录,即可获得完整的阅读与编辑体验 - 建议安装“目录”插件,方便在长文档中快速导航 - 利用双向链接功能,将学习笔记与教材内容关联起来
\textbf{使用建议} -
用Obsidian打开本教材的根目录,即可获得完整的阅读与编辑体验 -
建议安装“目录”插件,方便在长文档中快速导航 -
利用双向链接功能,将学习笔记与教材内容关联起来
\subsubsection{Git版本管理与GitHub协作}\label{gitux7248ux672cux7ba1ux7406ux4e0egithubux534fux4f5c}
\subsection{Git版本管理与GitHub协作}
\paragraph{为什么需要版本管理}
\subsubsection{为什么需要版本管理}
在项目开发过程中,文件会不断修改。版本管理工具可以: - 记录每一次修改的内容和时间 - 随时回退到之前的任意版本 - 多人协作时避免互相覆盖
在项目开发过程中,文件会不断修改。版本管理工具可以: -
记录每一次修改的内容和时间 - 随时回退到之前的任意版本 -
多人协作时避免互相覆盖
Git是当前最流行的分布式版本管理系统。
\paragraph{Git基础操作}\label{gitux57faux7840ux64cdux4f5c}
\subsubsection{Git基础操作}
\subparagraph{初始化仓库:}
\paragraph{初始化仓库:}
\emph{\# 在项目目录中初始化Git}\\
cd my\_project\\
git init
\subparagraph{日常三步曲:}
\paragraph{日常三步曲:}
\emph{\# 1. 查看当前修改状态}\\
git status\\
@@ -407,11 +440,15 @@ git log -\/- filename.md\\
\emph{\# 恢复某个文件到指定版本}\\
git checkout abc1234 -\/- filename.md
\paragraph{GitHub:云端协作平台}\label{githubux4e91ux7aefux534fux4f5cux5e73ux53f0}
\subsubsection{GitHub:云端协作平台}
\href{https://github.com/}{GitHub} 是基于Git的代码托管平台,提供云端存储和协作功能。
\href{https://github.com/}{GitHub}
是基于Git的代码托管平台,提供云端存储和协作功能。
\textbf{核心概念} - \textbf{仓库(Repository}:项目的存储空间,包含所有文件和历史记录 - \textbf{远程同步}:将本地仓库推送到GitHub,或从GitHub拉取更新 - \textbf{协作}:多人通过分支和合并协同工作
\textbf{核心概念} -
\textbf{仓库(Repository}:项目的存储空间,包含所有文件和历史记录 -
\textbf{远程同步}:将本地仓库推送到GitHub,或从GitHub拉取更新 -
\textbf{协作}:多人通过分支和合并协同工作
\textbf{常用操作}
@@ -426,13 +463,13 @@ git pull
\textbf{本书的Git管理}
本书内容即通过Git进行版本管理。每个章节的修改都有完整的提交记录,可以通过 git log 查看内容的演变历史。
本书内容即通过Git进行版本管理。每个章节的修改都有完整的提交记录,可以通过
git log 查看内容的演变历史。
\paragraph{推荐工作流}
\subsubsection{推荐工作流}
对于设计专业的学习和研究项目,建议采用以下简化工作流:
编写/修改文档 → git add → git commit → git push
每次完成一个阶段性工作(如写完一节内容、完成一次实验)后提交一次,附上简洁的说明。这样既保留了完整的历史记录,也不会因为误操作而丢失工作成果。
+24 -21
View File
@@ -1,16 +1,16 @@
\chapter{附录3学术论文撰写工作流}
\chapter{学术论文撰写工作流}
本附录介绍文献检索管理、论文写作工具、AI辅助写作流程及引用格式规范。
\subsection{文献检索与管理}
\section{文献检索与管理}
\subsubsection{检索平台}
\subsection{检索平台}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1899}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1965}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2117}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1979}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1771}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.6042}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
平台
@@ -23,19 +23,21 @@
\endhead
\bottomrule\noalign{}
\endlastfoot
Google Scholar & 综合学术搜索 & \href{https://scholar.google.com/}{scholar.google.com} \\
Google Scholar & 综合学术搜索 &
\href{https://scholar.google.com/}{scholar.google.com} \\
arXiv & AI领域预印本 & \href{https://arxiv.org/}{arxiv.org} \\
Semantic Scholar & AI辅助文献搜索 & \href{https://www.semanticscholar.org/}{semanticscholar.org} \\
Semantic Scholar & AI辅助文献搜索 &
\href{https://www.semanticscholar.org/}{semanticscholar.org} \\
CNKI & 中文学术文献 & \href{https://www.cnki.net/}{cnki.net} \\
\end{longtable}
}
\subsubsection{文献管理工具}
\subsection{文献管理工具}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.1184}}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.3303}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.1528}}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.4028}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
工具
@@ -52,20 +54,21 @@ EndNote & 功能全面、与Word深度集成 \\
\end{longtable}
}
\subsection{论文写作工具}
\section{论文写作工具}
\subsubsection{LaTeX}\label{latex}
\subsection{LaTeX}\label{latex}
学术排版的行业标准,适合公式密集的论文。
\begin{itemize}
\item
\textbf{在线编辑}\href{https://www.overleaf.com/}{Overleaf} --- 无需本地安装,支持协作
\textbf{在线编辑}\href{https://www.overleaf.com/}{Overleaf} ---
无需本地安装,支持协作
\item
\textbf{本地编辑}TeX Live + VSCode LaTeX Workshop 插件
\end{itemize}
\subsubsection{Markdown + Pandoc}\label{markdown-pandoc}
\subsection{Markdown + Pandoc}\label{markdown-pandoc}
轻量级写作方案,适合课程报告和技术文档。
@@ -73,12 +76,13 @@ EndNote & 功能全面、与Word深度集成 \\
pandoc paper.md -o paper.docx\\
pandoc paper.md -o paper.pdf -\/-pdf-engine=xelatex
\subsection{AI辅助写作流程}\label{aiux8f85ux52a9ux5199ux4f5cux6d41ux7a0b}
\section{AI辅助写作流程}
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\item
\textbf{文献综述}:使用 ChatGPT/Claude 快速了解研究领域的核心文献和发展脉络
\textbf{文献综述}:使用 ChatGPT/Claude
快速了解研究领域的核心文献和发展脉络
\item
\textbf{大纲生成}:通过AI辅助梳理论文结构和逻辑框架
\item
@@ -89,9 +93,9 @@ pandoc paper.md -o paper.pdf -\/-pdf-engine=xelatex
注意:AI辅助写作应遵循学术诚信原则,AI生成的内容需人工审核和改写,核心观点和论证应由作者独立完成。
\subsection{引用与格式规范}
\section{引用与格式规范}
\subsubsection{常用引用格式}
\subsection{常用引用格式}
\begin{itemize}
\item
@@ -102,7 +106,7 @@ pandoc paper.md -o paper.pdf -\/-pdf-engine=xelatex
\textbf{GB/T 7714}:中国国家标准
\end{itemize}
\subsubsection{BibTeX示例}\label{bibtexux793aux4f8b}
\subsection{BibTeX示例}
@article\{vaswani2017attention,\\
title=\{Attention is all you need\},\\
@@ -111,4 +115,3 @@ journal=\{NeurIPS\},\\
volume=\{30\},\\
year=\{2017\}\\
\}
+95 -75
View File
@@ -1,10 +1,10 @@
\chapter{附录4网络、网站与在线可视化}
\chapter{网络、网站与在线可视化}
本附录介绍网络基础知识、网站搭建入门,以及在线数据可视化的工具与方法。
\subsection{网络基础知识}
\section{网络基础知识}
\subsubsection{互联网与Web}
\subsection{互联网与Web}
互联网(Internet)是由全球计算机互相连接而成的网络。Web(万维网)是运行在互联网上的信息系统,通过浏览器访问网页来获取信息。
@@ -12,8 +12,8 @@
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.1617}}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.6553}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.1733}}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.8000}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
概念
@@ -33,28 +33,31 @@ API & 应用程序接口,程序之间交换数据的标准方式 \\
\end{longtable}
}
\subsubsection{前端与后端}
\subsection{前端与后端}
一个完整的Web应用由前端和后端两部分组成:
用户浏览器(前端) ←→ 服务器(后端) ←→ 数据库\\
HTML/CSS/JS Python/Node.js MySQL/PostgreSQL
\textbf{前端}:用户在浏览器中看到和操作的界面,使用 HTML、CSS、JavaScript 构建。
\textbf{前端}:用户在浏览器中看到和操作的界面,使用
HTML、CSS、JavaScript 构建。
\textbf{后端}:运行在服务器上的程序,处理数据逻辑、存储和检索,可以用 PythonFlask/Django/FastAPI)、Node.js、Java 等实现。
\textbf{后端}:运行在服务器上的程序,处理数据逻辑、存储和检索,可以用
PythonFlask/Django/FastAPI)、Node.js、Java 等实现。
\subsubsection{API与数据交互}\label{apiux4e0eux6570ux636eux4ea4ux4e92}
\subsection{API与数据交互}
APIApplication Programming Interface)是程序之间通信的接口。在AI应用中,调用大语言模型、获取在线数据等操作都通过API完成。
APIApplication Programming
Interface)是程序之间通信的接口。在AI应用中,调用大语言模型、获取在线数据等操作都通过API完成。
\textbf{RESTful API 基本概念}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1134}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1185}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2835}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1250}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1528}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3472}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
方法
@@ -84,12 +87,15 @@ data = response.json() \emph{\# 将返回的JSON解析为Python字典}\\
print(data)\\
\strut \\
\emph{\# POST请求示例}\\
payload = \{"prompt": "设计一个现代风格的客厅", "model": "stable-diffusion"\}\\
response = requests.post("https://api.example.com/generate", json=payload)
payload = \{"prompt": "设计一个现代风格的客厅", "model":
"stable-diffusion"\}\\
response = requests.post("https://api.example.com/generate",
json=payload)
\subsubsection{JSON数据格式}\label{jsonux6570ux636eux683cux5f0f}
\subsection{JSON数据格式}
JSONJavaScript Object Notation)是Web上最常用的数据交换格式,几乎所有API都使用JSON传递数据。
JSONJavaScript Object
Notation)是Web上最常用的数据交换格式,几乎所有API都使用JSON传递数据。
\{\\
"model": "ResNet",\\
@@ -112,16 +118,16 @@ json\_str = json.dumps(data, indent=2)\\
\emph{\# JSON字符串 → Python字典}\\
parsed = json.loads(json\_str)
\subsection{网站搭建入门}
\section{网站搭建入门}
\subsubsection{静态网站与动态网站}
\subsection{静态网站与动态网站}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1187}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3546}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2633}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2366}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1222}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3444}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2556}}
>{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2556}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
类型
@@ -136,12 +142,14 @@ parsed = json.loads(json\_str)
\endhead
\bottomrule\noalign{}
\endlastfoot
静态网站 & 页面内容固定,无需服务器处理 & HTML/CSS/JS & 作品集、项目文档 \\
动态网站 & 内容根据请求动态生成 & 前端 + 后端 + 数据库 & 在线工具、数据平台 \\
静态网站 & 页面内容固定,无需服务器处理 & HTML/CSS/JS &
作品集、项目文档 \\
动态网站 & 内容根据请求动态生成 & 前端 + 后端 + 数据库 &
在线工具、数据平台 \\
\end{longtable}
}
\subsubsection{静态网站快速搭建}
\subsection{静态网站快速搭建}
对于设计专业的学生,最实用的方式是使用静态网站生成器搭建项目展示或文档站点。
@@ -174,9 +182,9 @@ mkdocs build
即可通过 https://username.github.io/repo 访问
\end{enumerate}
\subsubsection{HTML/CSS/JavaScript 速览}\label{htmlcssjavascript-ux901fux89c8}
\section{HTML/CSS/JavaScript 速览}
\paragraph{HTML:页面结构}\label{htmlux9875ux9762ux7ed3ux6784}
\subsubsection{HTML:页面结构}
\textless!DOCTYPE html\textgreater{}\\
\textless{}\textbf{html}\textgreater{}\\
@@ -187,11 +195,12 @@ mkdocs build
\textless{}\textbf{h1}\textgreater 设计作品集\textless/\textbf{h1}\textgreater{}\\
\textless{}\textbf{p}\textgreater 欢迎来到我的作品展示页面\textless/\textbf{p}\textgreater{}\\
\textless{}\textbf{img} src="design.jpg" alt="设计作品"\textgreater{}\\
\textless{}\textbf{a} href="https://example.com"\textgreater 了解更多\textless/\textbf{a}\textgreater{}\\
\textless{}\textbf{a}
href="https://example.com"\textgreater 了解更多\textless/\textbf{a}\textgreater{}\\
\textless/\textbf{body}\textgreater{}\\
\textless/\textbf{html}\textgreater{}
\paragraph{CSS:页面样式}\label{cssux9875ux9762ux6837ux5f0f}
\subsubsection{CSS:页面样式}
body \{\\
\textbf{font-family}: "Helvetica", sans-serif;\\
@@ -205,22 +214,23 @@ h1 \{\\
\textbf{text-align}: center;\\
\}
\paragraph{JavaScript:页面交互}\label{javascriptux9875ux9762ux4ea4ux4e92}
\subsubsection{JavaScript:页面交互}
\emph{// 点击按钮时显示消息}\\
document.getElementById("myButton").addEventListener("click", \textbf{function}() \{\\
document.getElementById("myButton").addEventListener("click",
\textbf{function}() \{\\
alert("按钮被点击了!");\\
\});
\subsubsection{前端框架简介}
\subsection{前端框架简介}
对于更复杂的Web应用,可以使用前端框架提升开发效率:
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1107}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3071}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3379}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1667}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3750}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.4028}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
框架
@@ -245,36 +255,34 @@ Streamlit & Python编写Web应用 & AI模型展示、数据分析仪表板 \\
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
title("图像分类演示")
\end{enumerate}
st.write("上传一张图片,AI将识别其中的内容")
\begin{verbatim}
\end{verbatim}
uploaded\_file = st.file\_uploader("选择图片", type={[}"jpg", "png"{]})
\textbf{if} uploaded\_file:
st.image(uploaded\_file, caption="上传的图片")
\begin{verbatim}
\begin{lstlisting}
st.write("分类结果:建筑(置信度 95%")
\end{verbatim}
\end{lstlisting}
\emph{\# 安装并运行}\\
pip install streamlit\\
streamlit run app.py
\subsubsection{网站部署方式}
\subsection{网站部署方式}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3137}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2835}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1185}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3889}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3472}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1528}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
方式
@@ -294,13 +302,13 @@ Hugging Face Spaces & 适合AI模型演示 & 免费额度 \\
\end{longtable}
}
\subsection{在线数据可视化}
\section{在线数据可视化}
\subsubsection{为什么需要数据可视化}
\subsection{为什么需要数据可视化}
设计领域的AI研究和实践经常涉及数据展示:训练损失曲线、模型性能对比、空间数据分析结果等。数据可视化将抽象的数字转化为直观的图形,帮助理解和决策。
\subsubsection{Python可视化库}\label{pythonux53efux89c6ux5316ux5e93}
\subsection{Python可视化库}
Matplotlib:基础绑图
@@ -308,21 +316,27 @@ Matplotlib:基础绑图
\strut \\
\emph{\# 折线图}\\
epochs = range(1, 11)\\
train\_loss = {[}0.9, 0.6, 0.4, 0.25, 0.15, 0.1, 0.07, 0.05, 0.04, 0.03{]}\\
val\_loss = {[}0.85, 0.65, 0.45, 0.35, 0.28, 0.25, 0.24, 0.23, 0.23, 0.24{]}\\
train\_loss = {[}0.9, 0.6, 0.4, 0.25, 0.15, 0.1, 0.07, 0.05, 0.04,
0.03{]}\\
val\_loss = {[}0.85, 0.65, 0.45, 0.35, 0.28, 0.25, 0.24, 0.23, 0.23,
0.24{]}\\
\strut \\
plt.figure(figsize=(8, 5))\\
plt.plot(epochs, train\_loss, \textquotesingle b-o\textquotesingle, label=\textquotesingle Train Loss\textquotesingle)\\
plt.plot(epochs, val\_loss, \textquotesingle r-s\textquotesingle, label=\textquotesingle Val Loss\textquotesingle)\\
plt.plot(epochs, train\_loss, \textquotesingle b-o\textquotesingle,
label=\textquotesingle Train Loss\textquotesingle)\\
plt.plot(epochs, val\_loss, \textquotesingle r-s\textquotesingle,
label=\textquotesingle Val Loss\textquotesingle)\\
plt.xlabel(\textquotesingle Epoch\textquotesingle)\\
plt.ylabel(\textquotesingle Loss\textquotesingle)\\
plt.title(\textquotesingle Training vs Validation Loss\textquotesingle)\\
plt.title(\textquotesingle Training vs Validation
Loss\textquotesingle)\\
plt.legend()\\
plt.grid(True, alpha=0.3)\\
plt.savefig(\textquotesingle loss\_comparison.png\textquotesingle, dpi=150, bbox\_inches=\textquotesingle tight\textquotesingle)\\
plt.savefig(\textquotesingle loss\_comparison.png\textquotesingle,
dpi=150, bbox\_inches=\textquotesingle tight\textquotesingle)\\
plt.show()
\paragraph{Seaborn:统计可视化}\label{seabornux7edfux8ba1ux53efux89c6ux5316}
\subsubsection{Seaborn:统计可视化}
基于Matplotlib,提供更美观的统计图表。
@@ -333,11 +347,13 @@ plt.show()
data = np.random.randn(10, 10)\\
corr = np.corrcoef(data)\\
\strut \\
sns.heatmap(corr, annot=True, cmap=\textquotesingle coolwarm\textquotesingle)\\
plt.title(\textquotesingle Feature Correlation Heatmap\textquotesingle)\\
sns.heatmap(corr, annot=True,
cmap=\textquotesingle coolwarm\textquotesingle)\\
plt.title(\textquotesingle Feature Correlation
Heatmap\textquotesingle)\\
plt.savefig(\textquotesingle heatmap.png\textquotesingle, dpi=150)
\paragraph{Plotly:交互式可视化}\label{plotlyux4ea4ux4e92ux5f0fux53efux89c6ux5316}
\subsubsection{Plotly:交互式可视化}
支持鼠标悬停、缩放、导出等交互操作,适合Web展示。
@@ -351,15 +367,15 @@ title="Iris Dataset Scatter Plot")\\
fig.write\_html("scatter.html") \emph{\# 导出为网页}\\
fig.show()
\subsubsection{在线可视化工具}
\subsection{在线可视化工具}
无需编程,通过网页界面即可创建可视化:
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1646}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3405}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2036}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1667}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3039}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.5098}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
工具
@@ -372,23 +388,28 @@ fig.show()
\endhead
\bottomrule\noalign{}
\endlastfoot
Observable & JavaScript驱动的交互式笔记本 & \href{https://observablehq.com/}{observablehq.com} \\
Flourish & 拖拽式数据可视化,模板丰富 & \href{https://flourish.studio/}{flourish.studio} \\
Datawrapper & 适合制作新闻级图表 & \href{https://www.datawrapper.de/}{datawrapper.de} \\
Tableau Public & 强大的商业智能可视化 & \href{https://public.tableau.com/}{public.tableau.com} \\
ECharts & 百度开源的交互式图表 & \href{https://echarts.apache.org/}{echarts.apache.org} \\
Observable & JavaScript驱动的交互式笔记本 &
\href{https://observablehq.com/}{observablehq.com} \\
Flourish & 拖拽式数据可视化,模板丰富 &
\href{https://flourish.studio/}{flourish.studio} \\
Datawrapper & 适合制作新闻级图表 &
\href{https://www.datawrapper.de/}{datawrapper.de} \\
Tableau Public & 强大的商业智能可视化 &
\href{https://public.tableau.com/}{public.tableau.com} \\
ECharts & 百度开源的交互式图表库 &
\href{https://echarts.apache.org/}{echarts.apache.org} \\
\end{longtable}
}
\subsubsection{地理空间可视化}
\subsection{地理空间可视化}
设计领域经常涉及地理和空间数据的可视化:
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1113}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.3837}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2364}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1667}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.4583}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2917}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
工具
@@ -425,12 +446,12 @@ icon=folium.Icon(color="blue", icon="info-sign")\\
\emph{\# 保存为网页}\\
m.save("map.html")
\subsubsection{可视化设计原则}
\subsection{可视化设计原则}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.2361}}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.6363}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.2838}}
>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.6892}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
原则
@@ -448,4 +469,3 @@ m.save("map.html")
交互增强 & 在线可视化支持筛选、缩放、悬停查看详情 \\
\end{longtable}
}
+28 -20
View File
@@ -1,14 +1,14 @@
\chapter{附录5在线学习资源}
\chapter{在线学习资源}
本附录整理AI学习过程中常用的在线课程、技术博客与文档、以及公开数据集。
\subsection{推荐课程}
\section{推荐课程}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2921}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1101}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2141}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2182}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1000}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.6636}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
名称
@@ -21,21 +21,27 @@
\endhead
\bottomrule\noalign{}
\endlastfoot
CS231n:计算机视觉 & Stanford & \href{http://cs231n.stanford.edu/}{cs231n.stanford.edu} \\
Fast.ai:实用深度学习 & fast.ai & \href{https://course.fast.ai/}{course.fast.ai} \\
吴恩达深度学习专项课 & Coursera & \href{https://www.coursera.org/specializations/deep-learning}{coursera.org} \\
CS224nNLP与深度学习 & Stanford & \href{https://web.stanford.edu/class/cs224n/}{web.stanford.edu} \\
李宏毅机器学习 & YouTube & \href{https://www.youtube.com/c/HungyiLeeNTU}{youtube.com} \\
CS231n:计算机视觉 & Stanford &
\href{http://cs231n.stanford.edu/}{cs231n.stanford.edu} \\
Fast.ai:实用深度学习 & fast.ai &
\href{https://course.fast.ai/}{course.fast.ai} \\
吴恩达深度学习专项课 & Coursera &
\href{https://www.coursera.org/specializations/deep-learning}{coursera.org} \\
CS224nNLP与深度学习 & Stanford &
\href{https://web.stanford.edu/class/cs224n/}{web.stanford.edu} \\
李宏毅机器学习 & YouTube &
\href{https://www.youtube.com/c/HungyiLeeNTU}{youtube.com} \\
\end{longtable}
}
\subsection{博客与文档}
\section{博客与文档}
\begin{itemize}
\item
\href{https://lilianweng.github.io/}{Lil'Log} - AI深度技术文章
\item
\href{https://jalammar.github.io/illustrated-transformer/}{The Illustrated Transformer} - 可视化原理解析
\href{https://jalammar.github.io/illustrated-transformer/}{The
Illustrated Transformer} - 可视化原理解析
\item
\href{https://distill.pub/}{Distill.pub} - 交互式可视化论文
\item
@@ -46,13 +52,13 @@ CS224nNLP与深度学习 & Stanford & \href{https://web.stanford.edu/class/cs
\href{https://python.langchain.com/}{LangChain文档}
\end{itemize}
\subsection{数据集}
\section{数据集}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1735}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1185}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1987}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1928}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1325}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.6506}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
数据集
@@ -65,10 +71,12 @@ CS224nNLP与深度学习 & Stanford & \href{https://web.stanford.edu/class/cs
\endhead
\bottomrule\noalign{}
\endlastfoot
ImageNet & 图像分类 & \href{https://www.image-net.org/}{image-net.org} \\
ImageNet & 图像分类 &
\href{https://www.image-net.org/}{image-net.org} \\
COCO & 目标检测 & \href{https://cocodataset.org/}{cocodataset.org} \\
MNIST & 手写数字 & \href{http://yann.lecun.com/exdb/mnist/}{yann.lecun.com} \\
OpenStreetMap & 地图数据 & \href{https://www.openstreetmap.org/}{openstreetmap.org} \\
MNIST & 手写数字 &
\href{http://yann.lecun.com/exdb/mnist/}{yann.lecun.com} \\
OpenStreetMap & 地图数据 &
\href{https://www.openstreetmap.org/}{openstreetmap.org} \\
\end{longtable}
}
+27 -20
View File
@@ -1,10 +1,10 @@
\chapter{附录6其他资源}
\chapter{其他资源}
本附录整理AIGC工具、设计领域AI工具,以及设计AI相关的学术期刊与会议。
\subsection{AIGC工具}\label{aigcux5de5ux5177}
\section{AIGC工具}
\subsubsection{Stable Diffusion}\label{stable-diffusion}
\subsection{Stable Diffusion}\label{stable-diffusion}
\textbf{WebUI}\href{https://github.com/AUTOMATIC1111/stable-diffusion-webui}{Automatic1111}
@@ -14,20 +14,23 @@
\textbf{from} diffusers \textbf{import} StableDiffusionPipeline\\
\strut \\
pipe = StableDiffusionPipeline.from\_pretrained("runwayml/stable-diffusion-v1-5")\\
image = pipe("a photo of an astronaut riding a horse on mars").images{[}0{]}
pipe =
StableDiffusionPipeline.from\_pretrained("runwayml/stable-diffusion-v1-5")\\
image = pipe("a photo of an astronaut riding a horse on
mars").images{[}0{]}
\subsubsection{Midjourney}\label{midjourney}
\subsection{Midjourney}\label{midjourney}
\textbf{平台}Discord \textbf{文档}\href{https://docs.midjourney.com/}{docs.midjourney.com}
\textbf{平台}Discord
\textbf{文档}\href{https://docs.midjourney.com/}{docs.midjourney.com}
\subsection{设计领域AI工具}
\section{设计领域AI工具}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1790}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2364}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1779}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2111}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2333}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.5333}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
工具
@@ -40,18 +43,23 @@ image = pipe("a photo of an astronaut riding a horse on mars").images{[}0{]}
\endhead
\bottomrule\noalign{}
\endlastfoot
Midjourney & 图像生成与创意探索 & \href{https://www.midjourney.com/}{midjourney.com} \\
Stable Diffusion & 本地可控图像生成 & \href{https://stability.ai/}{stability.ai} \\
ControlNet & 精确结构控制 & \href{https://arxiv.org/abs/2302.05543}{arxiv.org} \\
Midjourney & 图像生成与创意探索 &
\href{https://www.midjourney.com/}{midjourney.com} \\
Stable Diffusion & 本地可控图像生成 &
\href{https://stability.ai/}{stability.ai} \\
ControlNet & 精确结构控制 &
\href{https://arxiv.org/abs/2302.05543}{arxiv.org} \\
Figma AI & 界面设计辅助 & \href{https://www.figma.com/}{figma.com} \\
Galileo AI & 界面布局生成 & \href{https://www.usegalileo.ai/}{usegalileo.ai} \\
Planner 5D & 室内设计自动生成 & \href{https://planner5d.com/}{planner5d.com} \\
Galileo AI & 界面布局生成 &
\href{https://www.usegalileo.ai/}{usegalileo.ai} \\
Planner 5D & 室内设计自动生成 &
\href{https://planner5d.com/}{planner5d.com} \\
\end{longtable}
}
\subsection{学术期刊与会议}
\section{学术期刊与会议}
\subsubsection{设计AI相关期刊}
\subsection{设计AI相关期刊}
\begin{itemize}
\item
@@ -62,7 +70,7 @@ Planner 5D & 室内设计自动生成 & \href{https://planner5d.com/}{planner5d.
Automation in Construction
\end{itemize}
\subsubsection{设计AI相关会议}
\subsection{设计AI相关会议}
\begin{itemize}
\item
@@ -72,4 +80,3 @@ Planner 5D & 室内设计自动生成 & \href{https://planner5d.com/}{planner5d.
\item
eCAADe
\end{itemize}
+1 -2
View File
@@ -1,4 +1,3 @@
\chapter{附录7参考文献}
\chapter{参考文献}
本部分整理教材中引用的论文、书籍和在线资源。
+15 -11
View File
@@ -1,14 +1,14 @@
\chapter{附录8关键术语表}
\chapter{关键术语表}
本附录按章节整理书中涉及的关键中英文术语。
\subsection{第二章}
\section{第二章}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1635}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2921}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.5444}}@{}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.1597}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.2605}}
>{\raggedright\arraybackslash}p{(\linewidth - 4\tabcolsep) * \real{0.5630}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
中文
@@ -23,7 +23,8 @@
\endlastfoot
数据模态 & Data Modality & 信息的存在形式,如文本、图像、三维等 \\
线性回归 & Linear Regression & \(y = ax + b\) 形式的函数拟合 \\
多元回归 & Multiple Regression & 多输入变量的线性模型 \(y = \sum a_{i}x_{i} + b\) \\
多元回归 & Multiple Regression & 多输入变量的线性模型
\(y = \sum a_{i}x_{i} + b\) \\
多层感知机 & Multi-Layer Perceptron (MLP) & 最基础的前馈神经网络结构 \\
前向传播 & Forward Propagation & 数据从输入层到输出层的计算过程 \\
激活函数 & Activation Function & 引入非线性的函数,如ReLU、Sigmoid \\
@@ -37,12 +38,15 @@
迁移学习 & Transfer Learning & 将一个任务学到的知识迁移到新任务 \\
基础模型 & Foundation Model & 在大规模数据上预训练的大型通用模型 \\
涌现能力 & Emergent Abilities & 模型规模大到一定程度后出现的新能力 \\
缩放定律 & Scaling Law & 模型性能与规模(数据量、参数量、计算量)之间的关系规律 \\
环境-智能体-任务 & Environment-Agent-Task & AI实践的三元框架:环境提供操作空间,智能体执行任务,任务定义目标 \\
Vibe Coding & Vibe Coding & 感觉驱动编程,用自然语言描述需求让AI生成代码的编程范式 \\
全连接层 & Fully Connected Layer & 每个神经元与上一层所有神经元相连的网络层 \\
缩放定律 & Scaling Law &
模型性能与规模(数据量、参数量、计算量)之间的关系规律 \\
环境-智能体-任务 & Environment-Agent-Task &
AI实践的三元框架:环境提供操作空间,智能体执行任务,任务定义目标 \\
Vibe Coding & Vibe Coding &
感觉驱动编程,用自然语言描述需求让AI生成代码的编程范式 \\
全连接层 & Fully Connected Layer &
每个神经元与上一层所有神经元相连的网络层 \\
预训练 & Pre-training & 在大规模数据上的初始训练阶段 \\
微调 & Fine-tuning & 在特定任务数据上对预训练模型进行适配训练 \\
\end{longtable}
}
+3 -2
View File
@@ -1,8 +1,9 @@
\chapter{附录9Tips}
\chapter{Tips}
\begin{itemize}
\item
用AI学习AI,大大减少了学习的时间和难度:例如markdown等语法,只需要学习两部分内容:1)掌握经常性的手动输入需要的内容,例如\#- 等,2)了解剩余的语法的大致机制,例如图片插入可以使用html语法,公式排版使用的是Latex语法,具体实现时让AI撰写。
用AI学习AI,大大减少了学习的时间和难度:例如markdown等语法,只需要学习两部分内容:1)掌握经常性的手动输入需要的内容,例如\#-
等,2)了解剩余的语法的大致机制,例如图片插入可以使用html语法,公式排版使用的是Latex语法,具体实现时让AI撰写。
\item
有任何不懂的问题,直接问AI,如Claude code等CLI Agent以及在线等的大模型
\end{itemize}
+151 -189
View File
@@ -3,9 +3,10 @@
本章建立读者对人工智能的宏观认知框架。从 AI 的发展历程出发,回顾从早期符号主义到深度学习、再到大模型时代的关键技术突破与转折节点;进而梳理 AI 的范式演进,从感知智能到生成式智能、从单一任务到通用智能的发展脉络,帮助读者理解 AI 技术的全貌和未来趋势。
\section{篇章导读}
\section*{篇章导读}
\addcontentsline{toc}{section}{篇章导读}
人工智能正在深刻改变设计的边界。从自动绘图到智能生成,从数据分析到自主决策,AI 技术为设计领域带来了前所未有的可能性。
人工智能正在深刻改变设计的边界。从自动绘图到智能生成,从数据分析到自主决策,AI 技术为设计领域带来了前所未有的可能性——同时也带来了前所未有的困惑
本篇将回答两个核心问题:
@@ -20,36 +21,34 @@
通过本篇学习,你将建立对 AI 的宏观认知,理解技术发展的脉络,为后续深入学习打下基础。
\section{学习目标}
\section*{学习目标}
\addcontentsline{toc}{section}{学习目标}
\begin{itemize}
\tightlist
\item
了解 AI 技术发展的关键时间节点
\item
理解 AI 四大赛道及其应用场景
\item
掌握设计领域 AI 应用的现状与趋势
\item
理解 AI 范式的三次演进
\item
掌握万能逼近定理的直观意义
\item
建立神经网络技术栈的完整认知
\item
理解 Scaling Law 与模型规模效应
\item 了解 AI 技术发展的关键时间节点
\item 理解 AI 四大赛道及其应用场景
\item 掌握设计领域 AI 应用的现状与趋势
\item 理解 AI 范式的三次演进
\item 掌握万能逼近定理的直观意义
\item 建立神经网络技术栈的完整认知
\item 理解 Scaling Law 与模型规模效应
\end{itemize}
\section{第一部分:AI 与设计的交汇}
%% ============================================================
%% 第一部分:AI 与设计的交汇
%% ============================================================
\section{案例引入:Amazon Go}
\section{AI 与设计的交汇}
\subsection{案例背景}
\subsection{案例引入:Amazon Go}
Amazon Go 是亚马逊推出的无人便利店,通过计算机视觉和传感器融合技术,实现“拿了就走”的购物体验。这一案例展示了多种 AI 技术如何协同工作,共同重构一个完整的线下场景。
\subsubsection{案例背景}
\subsection{技术要素}
Amazon Go 是亚马逊推出的无人便利店,通过计算机视觉和传感器融合技术,实现"拿了就走"的购物体验。这一案例展示了多种 AI 技术如何协同工作,重构一个完整的线下场景。
\subsubsection{技术要素}
Amazon Go 的 AI 技术栈融合了多项前沿技术:
@@ -68,49 +67,55 @@ Amazon Go 的 AI 技术栈融合了多项前沿技术:
\end{longtable}
}
\subsection{启示}
\subsubsection{启示}
Amazon Go 展示了 AI 技术如何重构传统场景。从扫码支付”到“拿了就走,AI 让交互变得更加自然。这个案例也说明,设计领域中许多看似复杂的环境感知与交互问题,都可以通过多技术的组合来加以解决。
Amazon Go 展示了 AI 技术如何重构传统场景。从"扫码支付"到"拿了就走",AI 让交互变得更加自然。这个案例也说明,设计领域中许多看似复杂的环境感知与交互问题,都可以通过多技术的组合来加以解决。
\section{AI 发展时间线2016--2024}
\subsection{AI 发展时间线}
\subsection{第一阶段:觉醒期(2016--2018}
\subsubsection{萌芽期(1950s--2015}
在深度学习爆发之前,AI 经历了漫长的探索期,积累了关键的理论基础:
\begin{itemize}
\tightlist
\item
\textbf{2016}AlphaGo 击败李世石,AI 进入公众视野
\item
\textbf{2017}Transformer 架构诞生,为大模型时代奠基
\item
\textbf{2018}:BERT 预训练模型问世,NLP 任务取得突破
\item \textbf{1956}:达特茅斯会议,"人工智能"概念正式诞生
\item \textbf{1986}反向传播算法(Backpropagation)被广泛应用,成为训练神经网络的核心方法
\item \textbf{1997}:Deep Blue 击败国际象棋世界冠军卡斯帕罗夫
\item \textbf{2012}AlexNet 在 ImageNet 竞赛中大幅领先,深度学习时代开启
\end{itemize}
\subsection{第二阶段:爆发期(2019--2022)}
这段历史告诉我们:AI 并非一夜之间爆发,而是几十年理论沉淀与技术迭代的结果。
\subsubsection{觉醒期(2016--2018}
\begin{itemize}
\tightlist
\item
\textbf{2019}GPT-2 展示强大的文本生成能力
\item
\textbf{2020}:GPT-3 发布,少样本学习能力震惊业界
\item
\textbf{2022}:ChatGPT 发布,AI 对话能力达到新高度
\item \textbf{2016}:AlphaGo 击败李世石,AI 进入公众视野
\item \textbf{2017}Transformer 架构诞生,为大模型时代奠基
\item \textbf{2018}:BERT 预训练模型问世,NLP 任务取得突破
\end{itemize}
\subsection{第三阶段:应用期(2023--2024}
\subsubsection{爆发期(2019--2022}
\begin{itemize}
\tightlist
\item
\textbf{2023}多模态大模型、AI Agent 概念兴起
\item
\textbf{2024}:具身智能、端侧 AI 加速落地
\item \textbf{2019}GPT-2 展示强大的文本生成能力
\item \textbf{2020}GPT-3 发布,少样本学习能力震惊业界
\item \textbf{2022}:ChatGPT 发布,AI 对话能力达到新高度
\end{itemize}
\section{AI 四大赛道}
\subsubsection{应用期(2023--2024}
\subsection{AIGCAI-Generated Content}\label{aigcai-generated-content}
\begin{itemize}
\tightlist
\item \textbf{2023}:多模态大模型、AI Agent 概念兴起
\item \textbf{2024}:具身智能、端侧 AI 加速落地
\end{itemize}
\subsection{AI 四大赛道}
\subsubsection{AIGCAI-Generated Content}\label{aigcai-generated-content}
\textbf{定义}:人工智能生成内容
@@ -118,19 +123,15 @@ Amazon Go 展示了 AI 技术如何重构传统场景。从“扫码支付”到
\begin{itemize}
\tightlist
\item
文本生成:文章、报告、代码
\item
图像生成:设计稿、效果图、图标
\item
视频生成:短视频、动画、特效
\item
音频生成:音乐、配音、音效
\item 文本生成:文章、报告、代码
\item 图像生成:设计稿、效果图、图标
\item 视频生成:短视频、动画、特效
\item 音频生成:音乐、配音、音效
\end{itemize}
\textbf{设计影响}:从工具辅助”到“生成伙伴
\textbf{设计影响}:从"工具辅助"到"生成伙伴"
\subsection{Agent(智能体)}
\subsubsection{Agent(智能体)}
\textbf{定义}:能够自主感知、规划、执行的系统
@@ -138,19 +139,15 @@ Amazon Go 展示了 AI 技术如何重构传统场景。从“扫码支付”到
\begin{itemize}
\tightlist
\item
\textbf{感知(Perception}:理解环境信息
\item
\textbf{规划(Planning}:制定行动方案
\item
\textbf{记忆(Memory}:存储和检索经验
\item
\textbf{工具(Tool Use}:调用外部资源
\item \textbf{感知(Perception}:理解环境信息
\item \textbf{规划(Planning}:制定行动方案
\item \textbf{记忆(Memory}:存储和检索经验
\item \textbf{工具(Tool Use}:调用外部资源
\end{itemize}
\textbf{设计影响}:从被动执行”到“主动协作
\textbf{设计影响}:从"被动执行"到"主动协作"
\subsection{AI4SAI for Science}\label{ai4sai-for-science}
\subsubsection{AI4SAI for Science}\label{ai4sai-for-science}
\textbf{定义}AI 驱动科学发现
@@ -158,19 +155,15 @@ Amazon Go 展示了 AI 技术如何重构传统场景。从“扫码支付”到
\begin{itemize}
\tightlist
\item
蛋白质结构预测(AlphaFold
\item
材料科学计算
\item
气候变化模拟
\item
城市系统优化
\item 蛋白质结构预测(AlphaFold
\item 材料科学计算
\item 气候变化模拟
\item 城市系统优化
\end{itemize}
\textbf{设计影响}:数据驱动的设计决策
\subsection{AIEDAI in Education}\label{aiedai-in-education}
\subsubsection{AIEDAI in Education}\label{aiedai-in-education}
\textbf{定义}AI 在教育领域的应用
@@ -178,21 +171,17 @@ Amazon Go 展示了 AI 技术如何重构传统场景。从“扫码支付”到
\begin{itemize}
\tightlist
\item
个性化学习路径
\item
智能答疑与辅导
\item
学习行为分析
\item
知识图谱构建
\item 个性化学习路径
\item 智能答疑与辅导
\item 学习行为分析
\item 知识图谱构建
\end{itemize}
\textbf{设计影响}:设计教育与人才培养模式变革
\section{设计领域 AI 应用趋势}
\subsection{设计领域 AI 应用趋势}
\subsection{当前应用}
\subsubsection{当前应用}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}lll@{}}
@@ -210,38 +199,26 @@ Amazon Go 展示了 AI 技术如何重构传统场景。从“扫码支付”到
\end{longtable}
}
\subsection{未来趋势}
\subsubsection{未来趋势}
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
\textbf{单点工具到系统化解决方案}
\item
\textbf{从生成内容到生成决策}
\item
\textbf{从人机协作到人机共生}
\end{enumerate}
\section{思考与练习}
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
选择你熟悉的设计领域,分析 AI 在该领域的应用现状和潜力。
\item
思考 AI 四大赛道中,哪一个对你的专业影响最大?为什么?
\item
Amazon Go 案例中,哪些 AI 技术可以迁移到设计领域?
\item \textbf{从单点工具到系统化解决方案}
\item \textbf{生成内容到生成决策}
\item \textbf{从人机协作到人机共生}
\end{enumerate}
\section{第二部分:AI 范式演进}
%% ============================================================
%% 第二部分:AI 范式演进
%% ============================================================
\section{AI 范式的三次演进}
\section{AI 范式演进}
\subsection{第一范式:规则系统(Symbolic AI)}
\subsection{三次范式演进}
\subsubsection{第一范式:规则系统(Symbolic AI)}
\textbf{时期}1950s -- 1980s
@@ -251,17 +228,14 @@ Amazon Go 展示了 AI 技术如何重构传统场景。从“扫码支付”到
\begin{itemize}
\tightlist
\item
逻辑推理清晰
\item
知识表达明确
\item
泛化能力弱
\item 逻辑推理清晰
\item 知识表达明确
\item 泛化能力弱
\end{itemize}
\textbf{典型应用}:专家系统、棋类游戏
\subsection{第二范式:机器学习(Machine Learning}
\subsubsection{第二范式:机器学习(Machine Learning}
\textbf{时期}1990s -- 2010s
@@ -271,17 +245,14 @@ Amazon Go 展示了 AI 技术如何重构传统场景。从“扫码支付”到
\begin{itemize}
\tightlist
\item
数据驱动
\item
特征工程依赖专家经验
\item
任务特定
\item 数据驱动
\item 特征工程依赖专家经验
\item 任务特定
\end{itemize}
\textbf{典型应用}:推荐系统、图像分类、语音识别
\subsection{第三范式:深度学习(Deep Learning}
\subsubsection{第三范式:深度学习(Deep Learning}
\textbf{时期}2012 -- 至今
@@ -291,43 +262,36 @@ Amazon Go 展示了 AI 技术如何重构传统场景。从“扫码支付”到
\begin{itemize}
\tightlist
\item
大数据驱动
\item
自动特征学习
\item
迁移学习能力强
\item 大数据驱动
\item 自动特征学习
\item 迁移学习能力强
\end{itemize}
\textbf{典型应用}:大语言模型、生成式 AI、自动驾驶
\section{万能逼近定理}
\subsection{万能逼近定理}
\subsection{定理表述}
\subsubsection{定理表述}
\textbf{Universal Approximation Theorem1989}:一个具有足够多神经元的单隐藏层前馈神经网络,可以以任意精度逼近任何连续函数。
\subsection{直观理解}
\subsubsection{直观理解}
想象一张橡皮膜:
\begin{itemize}
\tightlist
\item
输入空间是平面上的点
\item
神经网络调整膜的形状
\item
神经元越多,膜的形变能力越强
\item
最终可以拟合任意复杂的曲面
\item 输入空间是平面上的点
\item 神经网络调整膜的形状
\item 神经元越多,膜的形变能力越强
\item 最终可以拟合任意复杂的曲面
\end{itemize}
\subsection{启示}
\subsubsection{启示}
这个定理告诉我们:\textbf{神经网络具有强大的表达能力,理论上可以学习任何复杂的映射关系}。这也是深度学习能够处理图像、语言、语音等复杂任务的数学基础。
\section{神经网络技术栈全景}
\subsection{神经网络技术栈全景}
\begin{lstlisting}
┌─────────────────────────────────────────────────────────────┐
@@ -345,7 +309,7 @@ Amazon Go 展示了 AI 技术如何重构传统场景。从“扫码支付”到
└─────────────────────────────────────────────────────────────┘
\end{lstlisting}
\subsection{技术演进路径}
\subsubsection{技术演进路径}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}lll@{}}
@@ -364,7 +328,7 @@ Amazon Go 展示了 AI 技术如何重构传统场景。从“扫码支付”到
\end{longtable}
}
\subsection{模型家族关系}
\subsubsection{模型家族关系}
\begin{lstlisting}
MLP(多层感知机)
@@ -384,73 +348,65 @@ MLP(多层感知机)
(生成式) (理解式) (图像生成)
\end{lstlisting}
\section{Scaling Law:规模即智能}
\subsection{Scaling Law:规模即智能}
\subsection{什么是 Scaling Law}
\subsubsection{什么是 Scaling Law}
Scaling Law(缩放定律)描述了模型性能与计算量、数据量、参数量之间的关系:
\textbf{模型性能 f(计算量, 数据量, 参数量)}
\textbf{模型性能 $\approx$ f(计算量, 数据量, 参数量)}
\subsection{核心发现}
这一发现来自 Kaplan 等人 2020 年的研究(Scaling Laws for Neural Language Models),揭示了一个令人惊讶的规律:模型性能的提升并非随机的,而是可以被精确预测的。
\subsubsection{核心发现}
\textbf{1. 性能随规模对数增长}
\begin{itemize}
\tightlist
\item
模型越大,性能越好
\item
增长是可预测的
\item 模型越大,性能越好
\item 性能提升的幅度可以量化预测
\end{itemize}
\textbf{2. 计算效率最关键}
\begin{itemize}
\tightlist
\item
计算量增加 10 倍 → 性能提升约 1.5 倍
\item
数据量和参数量也有类似规律
\item 计算量增加 10 倍,性能提升约 1.5 倍
\item 数据量和参数量也有类似规律
\end{itemize}
\textbf{3. 没有看到天花板}
\begin{itemize}
\tightlist
\item
在现有规模下,性能提升仍在继续
\item 在现有规模下,性能提升仍在继续
\end{itemize}
\subsection{启示}
\subsubsection{启示}
\begin{itemize}
\tightlist
\item
\textbf{大模型时代}:规模成为竞争壁垒
\item
\textbf{数据为王}:高质量数据比模型架构更重要
\item
\textbf{算力需求}AI 发展依赖硬件进步
\item \textbf{大模型时代}:规模成为竞争壁垒
\item \textbf{数据为王}:高质量数据比模型架构更重要
\item \textbf{算力需求}AI 发展依赖硬件进步
\item \textbf{对设计领域的意义}:开源大模型的涌现使得小型设计团队也能获得强大的 AI 能力,降低了技术门槛
\end{itemize}
\section{从函数式视角看 AI 演进}
\subsection{从函数式视角看 AI 演进}
\subsection{核心理念}
\subsubsection{核心理念}
\textbf{``Functions Describe the World''(函数描述世界)}
\textbf{``Functions Describe the World''(函数描述世界)}——这一理念由美国威廉姆斯学院(Williams College)数学教授 Thomas Garrity 提出。他认为数学各分支本质上都在研究不同类型的函数:代数研究多项式函数,微积分研究光滑函数,线性代数研究线性变换。而世间万物——从声波在耳膜上的振动,到光线在视网膜上的投影——都可以用函数来描述。
\begin{itemize}
\tightlist
\item
物理定律:F = ma
\item
经济规律:Supply = Demand(Price)
\item
神经网络:y = f(x; θ)
\item 物理定律:$F = ma$
\item 经济规律:Supply = Demand(Price)
\item 神经网络:$y = f(x; \theta)$
\end{itemize}
\subsection{AI 即函数组合}
\subsubsection{AI 即函数组合}
\begin{lstlisting}
输入数据 x
@@ -474,7 +430,7 @@ Scaling Law(缩放定律)描述了模型性能与计算量、数据量、参
输出 y
\end{lstlisting}
\subsection{从 Excel 到神经网络}
\subsubsection{从 Excel 到神经网络}
{\def\LTcaptype{none} % do not increment counter
\begin{longtable}[]{@{}ll@{}}
@@ -491,17 +447,27 @@ y = a₁x₁ + a₂x₂ + b & 多输入神经元 \\
\end{longtable}
}
\section{本章小结}
本章从两个维度建立了对人工智能的宏观认知。
在第一节中,我们沿着时间线梳理了 AI 从萌芽到爆发的关键节点,了解了 AIGC、Agent、AI4S、AIED 四大赛道及其对设计领域的影响。Amazon Go 的案例让我们看到,AI 技术的组合可以重构一个完整的物理场景——这暗示着设计领域同样存在系统化变革的可能。
在第二节中,我们审视了 AI 范式的三次演进——从人类编写规则,到机器从数据中学习,再到端到端的深度学习。万能逼近定理告诉我们神经网络理论上可以学习任何映射关系,Scaling Law 则揭示了模型性能的可预测性。而"函数描述世界"的视角,为理解后续章节中的各类神经网络架构提供了统一的认知框架。
理解了 AI 的过去和现在,下一章我们将进入 AI 的内部——看看神经网络究竟是如何"学习"的。
\section{思考与练习}
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
万能逼近定理告诉我们神经网络“能”做任何事,但没有说“如何”高效学习。这个区别意味着什么?
\item
Scaling Law 是否意味着“越大越好”?在资源有限的情况下,应该如何权衡
\item
从函数式视角理解 AI,对你理解设计问题有何启发?
\item 选择你熟悉的设计领域,分析 AI 在该领域的应用现状和潜力。
\item 思考 AI 四大赛道中,哪一个对你的专业影响最大?为什么?
\item Amazon Go 案例中,哪些 AI 技术可以迁移到设计领域?
\item 万能逼近定理告诉我们神经网络"能"做任何事,但没有说"如何"高效学习。这个区别意味着什么
\item Scaling Law 是否意味着"越大越好"?在资源有限的情况下,应该如何权衡?
\item 从函数式视角理解 AI,对你理解设计问题有何启发?
\end{enumerate}
@@ -541,12 +507,8 @@ AI in Education & AIED & AI 教育应用 \\
\begin{itemize}
\tightlist
\item
\href{https://arxiv.org/abs/2001.08361}{Scaling Laws for Neural Language Models}
\item
\href{https://en.wikipedia.org/wiki/Universal_approximation_theorem}{Universal Approximation Theorem}
\item
\href{https://www.nature.com/articles/s41586-023-06221-x}{The Evolution of AI: A Historical Perspective}
\item
\href{https://arxiv.org/pdf/2308.11432v2}{AI Agent 综述论文}
\item \href{https://arxiv.org/abs/2001.08361}{Scaling Laws for Neural Language Models}
\item \href{https://en.wikipedia.org/wiki/Universal_approximation_theorem}{Universal Approximation Theorem}
\item \href{https://www.nature.com/articles/s41586-023-06221-x}{The Evolution of AI: A Historical Perspective}
\item \href{https://arxiv.org/pdf/2308.11432v2}{AI Agent 综述论文}
\end{itemize}
File diff suppressed because it is too large Load Diff
+49
View File
@@ -0,0 +1,49 @@
\chapter{结语与展望}
\section{回顾:从原理到实践}
回顾全书,我们从两个维度展开了设计人工智能的探索。
\textbf{上篇}聚焦技术原理。我们从AI的发展历程出发,理解了神经网络的函数式本质——通过函数组合逼近任意复杂的映射关系。在此基础上,沿着数据模态的主线,依次探讨了:一维序列数据与自然语言处理(RNN、Transformer、大语言模型),二维图像与计算机视觉(CNN、ViT),三维空间与空间智能(PointNet、3D重建)。进而,我们学习了生成式AI(VAE、GAN、扩散模型)如何从数据中学习分布并创造新内容,AI Agent如何将感知、推理与行动闭环整合,以及强化学习如何通过试错与反馈优化策略。
这些技术并非孤立的模块,而是构成了一个完整的智能系统架构:感知引擎理解世界,生成引擎创造可能,推理引擎做出决策,而强化学习提供了持续改进的机制。
\textbf{下篇}转向设计实践。我们看到AI已经在数字媒体、工业设计、环境景观、城市规划与生态设计等领域展现出强大的应用潜力。每个领域都有其独特的数据特征、评估标准和决策逻辑,AI的价值不在于替代设计师,而在于扩展设计师的能力边界——处理更大规模的数据、探索更广阔的方案空间、做出更精准的评估判断。
\section{核心洞见}
贯穿全书,有几个核心观点值得再次强调:
\textbf{理解原理比掌握工具更重要。}工具和平台层出不穷、快速迭代,但背后的原理——函数逼近、注意力机制、扩散过程、策略优化——具有持久的价值。掌握了原理,面对任何新工具都能快速上手;反之,仅停留在工具操作层面,则永远只能被动跟随。
\textbf{数据和问题定义是关键。}AI的效果高度依赖于数据质量和问题定义的清晰程度。在设计领域,这意味着需要认真思考:我们要解决什么问题?用什么数据来训练和评估?如何定义"好设计"?这些问题往往比模型选择更为重要。
\textbf{人机协作是正确的方向。}AI擅长处理大规模数据、快速生成方案、进行穷举搜索;人类擅长理解语境、做出价值判断、处理模糊和矛盾的需求。两者的结合,而非相互替代,才能产生最大的价值。
\section{展望:设计智能的未来}
站在2026年的时间节点上,设计人工智能正在经历从"工具辅助"到"智能协同"的转变。以下几个方面值得关注:
\textbf{多模态融合}。未来的设计AI将不再局限于单一模态,而是能够同时理解文本、图像、三维模型、空间数据等多种信息,形成对设计任务的全面理解。这将使得设计师能够以更自然的方式与AI交互——用草图、语言、手势等多种方式表达设计意图。
\textbf{自主设计探索}。随着AI Agent技术的成熟,AI将从被动执行指令的工具,进化为能够主动提出设计方案、自主评估优化、甚至发现人类未曾想到的解决方案的设计伙伴。设计师的角色将更多地转向目标定义、约束设定和质量把关。
\textbf{设计知识的系统化}。长期以来,设计知识高度依赖个人经验和隐性知识,难以系统化传承。AI有望通过学习海量的设计案例,将设计知识显性化、结构化,使设计经验能够被更广泛地共享和复用。
\textbf{伦理与可持续性}。AI在设计中的应用必须考虑伦理和社会影响——算法偏见、知识产权、就业影响、能源消耗等问题都需要认真对待。可持续设计不应仅停留在概念层面,而应融入AI辅助设计的每一个环节。
\textbf{设计教育的变革}。设计教育需要重新思考课程体系,在保持设计思维和美学素养培养的同时,融入计算思维和数据素养的训练。未来的设计师需要既懂设计,又理解AI,还能在两者之间架起桥梁。
\section{致读者}
设计的人工智能时代才刚刚拉开序幕。这本书所涵盖的内容,与其说是对这一领域的完整总结,不如说是一份邀请——邀请你走进这个充满可能性的领域,用自己的专业视角去发现问题、定义问题、解决问题。
无论你是设计专业的学生、教师,还是从业设计师,希望你从这本书中获得的不只是一些技术知识,更是一种思维方式:用计算的视角理解设计,用设计的智慧引导技术。
技术在变,工具在变,但设计服务于人的本质不会变。愿你在AI时代,成为更好的设计师。
\begin{flushright}
彭晓
2026年4月25日
\end{flushright}
+2
View File
@@ -0,0 +1,2 @@
\chapter*{下篇:设计领域应用}
\addcontentsline{toc}{chapter}{下篇:设计领域应用}
+2
View File
@@ -0,0 +1,2 @@
\chapter*{上篇:原理与技术}
\addcontentsline{toc}{chapter}{上篇:原理与技术}
+5
View File
@@ -28,6 +28,7 @@
\mainmatter
% 上篇:原理与技术
\input{chapters/divider-upper}
\input{chapters/ch01-intro}
\input{chapters/ch02-framework}
\input{chapters/ch03-1d-sequence}
@@ -38,11 +39,15 @@
\input{chapters/ch08-rl}
% 下篇:设计领域应用
\input{chapters/divider-lower}
\input{chapters/ch09-digital-media}
\input{chapters/ch10-industrial}
\input{chapters/ch11-environment}
\input{chapters/ch12-urban}
% 结语
\input{chapters/ch13-conclusion}
% ---------- 附录部分 ----------
\appendix
\input{appendices/ap00-divider}