Skip to content

Commit c528634

Browse files
authored
Fix reverse-mode typo: multiply by r_3 (output adjoint) (#24)
Replace r_1 multiplier with r_3 (output adjoint) in Reverse/Reverse*
1 parent 1568739 commit c528634

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Lectures/autodiff.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ t_3 & = \partial_1 f_3 \cdot t_1 + \partial_2 f_3 \cdot t_2\\
147147
r_1 &
148148
r_2
149149
\end{bmatrix}
150-
& \mathrel{\raise{0.19ex}{\scriptstyle+}} = r_1 \cdot \partial f_3\\
151-
& \mathrel{\raise{0.19ex}{\scriptstyle+}} = r_1 \cdot
150+
& \mathrel{\raise{0.19ex}{\scriptstyle+}} = r_3 \cdot \partial f_3\\
151+
& \mathrel{\raise{0.19ex}{\scriptstyle+}} = r_3 \cdot
152152
\begin{bmatrix}
153153
\partial_1 f_3 & \partial_2 f_3
154154
\end{bmatrix}\\
155155
& \mathrel{\raise{0.19ex}{\scriptstyle+}} =
156156
\begin{bmatrix}
157-
r_1 \cdot\partial_1 f_3 & r_1 \cdot\partial_2 f_3
157+
r_3 \cdot\partial_1 f_3 & r_3 \cdot\partial_2 f_3
158158
\end{bmatrix}
159159
\end{align}
160160
```
@@ -168,14 +168,14 @@ t_3 & = \partial_1 f_3 \cdot t_1 + \partial_2 f_3 \cdot t_2\\
168168
\begin{bmatrix}
169169
r_1\\
170170
r_2
171-
\end{bmatrix} & \mathrel{\raise{0.19ex}{\scriptstyle+}} = \partial f_3^* \cdot r_1\\
171+
\end{bmatrix} & \mathrel{\raise{0.19ex}{\scriptstyle+}} = \partial f_3^* \cdot r_3\\
172172
& \mathrel{\raise{0.19ex}{\scriptstyle+}} =
173173
\begin{bmatrix}
174174
\partial_1 f_3\\ \partial_2 f_3
175-
\end{bmatrix} \cdot r_1\\
175+
\end{bmatrix} \cdot r_3\\
176176
& \mathrel{\raise{0.19ex}{\scriptstyle+}} =
177177
\begin{bmatrix}
178-
\partial_1 f_3 \cdot r_1 \\ \partial_2 f_3 \cdot r_1
178+
\partial_1 f_3 \cdot r_3 \\ \partial_2 f_3 \cdot r_3
179179
\end{bmatrix}
180180
\end{align}
181181
```

0 commit comments

Comments
 (0)