Skip to content

Commit af681b4

Browse files
authored
Update backpropagation.qmd
1 parent 9159c61 commit af681b4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

backpropagation.qmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,17 @@ $\frac{\partial J}{\partial \theta_1}$,
7979
$\frac{\partial J}{\partial \theta_2}$, etc. Each of these gradients can
8080
be calculated via the chain rule. Here is the chain rule written out for
8181
the gradients for $\theta_1$ and $\theta_2$:
82-
\[
8382
\newcommand{\sharedterm}{%
84-
\colorbox{shared_term_color}{%
85-
$\displaystyle
83+
\colorbox[RGB]{0.9,0.9,0.9}{%
84+
\ensuremath{\displaystyle
8685
\frac{\partial J}{\partial \mathbf{x}_L}
8786
\frac{\partial \mathbf{x}_L}{\partial \mathbf{x}_{L-1}}
8887
\cdots
8988
\frac{\partial \mathbf{x}_3}{\partial \mathbf{x}_2}
90-
$%
89+
}%
9190
}%
9291
}
92+
$$
9393
\begin{aligned}
9494
\frac{\partial J}{\partial \theta_1}
9595
&=
@@ -102,7 +102,7 @@ the gradients for $\theta_1$ and $\theta_2$:
102102
\sharedterm\,
103103
\frac{\partial \mathbf{x}_2}{\partial \theta_2}
104104
\end{aligned}
105-
\]
105+
$$
106106
Rather than evaluating both equations separately, we
107107
notice that all the terms in each gray box are shared. We only need to
108108
evaluate this product once, and then can use it to compute both

0 commit comments

Comments
 (0)