跳到主要内容Skip to main content

反向传播Backpropagation

Backpropagation

  • 核心概念Core concepts
  • 第四站 · 看懂Station 4 · Under the Hood
  • 引用核验 2026-11-17refs checked 2026-11-17
解决什么问题What problem it solves

从损失往回算每一层参数该往哪个方向调整,是训练神经网络的核心算法。Work backward from the loss to find how each layer’s parameters should change. It is the core algorithm of neural-network training.

这是什么What it is

前向算出预测与损失,反向用链式法则逐层求梯度。

PyTorch 的 autograd 自动记录运算图并执行这一步。

The forward pass computes predictions and loss; the backward pass applies the chain rule layer by layer to get gradients.

PyTorch’s autograd records the computation graph and performs this step automatically.

The forward pass computes outputs and loss; the backward pass applies the chain rule layer by layer to produce gradients for every parameter.
前向逐层算输出与损失,反向按链式法则把误差一层层传回,得到每个参数的梯度。The forward pass computes outputs and loss; the backward pass applies the chain rule layer by layer to produce gradients for every parameter.
为什么需要知道Why it matters

不懂它就容易把「训练不收敛」归因于玄学;梯度消失、爆炸、累积都是这里的问题。Without it, a training failure looks like magic. Vanishing gradients, exploding gradients and accumulation all live here.

别名Chinese aliases

BP · backprop · 误差反向传播

出处Sources
  • Goodfellow 等 · Deep Learning 第 6 章Goodfellow et al., Deep Learning, Chapter 6 ↗
  • PyTorch · Autograd 机制PyTorch autograd mechanics ↗