Backprop through y = Ax: one dot product at a time

Forward, each output is a row of A dotted with x. Backward, each input’s gradient is a column of A dotted with g. Press play, drag the slider, or click any entry to see where it comes from. Every number above the line is editable.

y = Ax drawn as wires Each input x_j is joined to each output y_i by a wire of weight A_ij, and each y_i feeds the loss L with sensitivity g_i. The wires light up as each output is computed going forward, and as each gradient entry is computed coming back.
shape ×