Skip to content

Commit e45efc2

Browse files
Revert prefactor m in autograd documentation (#3221)
The prefactor m was incorrectly added to the vector-Jacobian product formula in the autograd tutorial. This change was based on the mistaken assumption that m-scaling was necessary to account for multiple terms in the summation. However, the chain rule and vector-Jacobian product formula already correctly aggregate contributions from all intermediate variables without requiring explicit scaling by m.
1 parent 82f449a commit e45efc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beginner_source/blitz/autograd_tutorial.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,15 @@
191191
# .. math::
192192
#
193193
#
194-
# J^{T}\cdot \vec{v} = m \cdot \left(\begin{array}{ccc}
194+
# J^{T}\cdot \vec{v} = \left(\begin{array}{ccc}
195195
# \frac{\partial y_{1}}{\partial x_{1}} & \cdots & \frac{\partial y_{m}}{\partial x_{1}}\\
196196
# \vdots & \ddots & \vdots\\
197197
# \frac{\partial y_{1}}{\partial x_{n}} & \cdots & \frac{\partial y_{m}}{\partial x_{n}}
198198
# \end{array}\right)\left(\begin{array}{c}
199199
# \frac{\partial l}{\partial y_{1}}\\
200200
# \vdots\\
201201
# \frac{\partial l}{\partial y_{m}}
202-
# \end{array}\right) = m \cdot \left(\begin{array}{c}
202+
# \end{array}\right) = \left(\begin{array}{c}
203203
# \frac{\partial l}{\partial x_{1}}\\
204204
# \vdots\\
205205
# \frac{\partial l}{\partial x_{n}}

0 commit comments

Comments
 (0)