Backpropagation

Disegnino.

Explanation of Backpropagation with a Simple Example

Given:

We want to compute the gradients of with respect to , , and for the input values:


Step 1: Forward pass

Calculate intermediate values:


Step 2: Backward pass (compute gradients)

We want , , and .

Using the chain rule:

Gradients of :

Gradients of (since ):

  • Here, is greater than , so depends only on .
  • Therefore:

Step 3: Compute final gradients

Using the chain rule again:


Summary:

VariableValueGradient of
12
25
00

This illustrates how backpropagation applies the chain rule to compute gradients efficiently.