File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
8080be calculated via the chain rule. Here is the chain rule written out for
8181the 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+ $$
106106Rather than evaluating both equations separately, we
107107notice that all the terms in each gray box are shared. We only need to
108108evaluate this product once, and then can use it to compute both
You can’t perform that action at this time.
0 commit comments