Deep Learning Lab
Interactive math figures
用同一个声明式组件绘制文章与概念页中的数学图。二维图使用响应式 SVG,可以随指针和键盘滑块更新;未来的三维曲面会从同一入口按需加载 WebGL renderer。
二维函数
From log-odds to probabilityMove the pointer or drag the slider to watch the log-odds z turn into a probability p.
σ(z) = 1 / (1 + e⁻ᶻ)From a hard threshold to a smooth oneDrag the input to compare the step function with the sigmoid that flattens it out.
σ(z) ≈ 1{z ≥ 0} Sigmoid 0.500 Step function 1.000
Four common activation functionsDrag z to compare what sigmoid, tanh, ReLU and GELU each do to the same input.
φ(z) Sigmoid 0.500 Tanh 0.000 ReLU 0.000 GELU 0.000
Two one-sided detectors added togetherDrag the difference d to compare plain subtraction with ReLU(d) + ReLU(−d).
|d| = ReLU(d) + ReLU(−d) |d| 0.500 Linear d 0.500
A straight line cannot follow a bandDrag the temperature to compare the target band with any linear score.
z = w·x + b Target (comfortable = 1) 1.000 Linear score z 0.150
Two hinges enclose a bandDrag the temperature to see how the "how far above" and "how far below" units combine into a score.
z = 2 − ReLU(x − 22) − ReLU(20 − x) Score z 2.000 h₁ = degrees above 22 0.000 h₂ = degrees below 20 0.000
平面图
没有卡片外壳的二维图,用点、直线和半平面着色。适合决策边界这类示意图。
y = 1 y = 0
y = 1 y = 0
三维曲面
三维图把两个输入或参数放在平面上,再用高度表达函数输出。两个示例共享同一套 WebGL 运行时,但拥有不同的交互控制。
双参数线性回归的损失曲面 WebGL 2
拖动旋转曲面,播放或移动步数滑块,观察参数如何沿梯度逐步靠近最低点。J(w₁, w₂)
正在生成曲面…
双特征逻辑回归的概率曲面 WebGL 2
改变偏置 b,观察概率曲面和 p = 0.5 的决策边界怎样一起移动。p = σ(1.2x₁ − 0.9x₂ + b)
正在生成曲面…