Rudy’s OBTF Rudolf Adamkovič

Home / Deep learning / Automatic differentiation / Method


Diagram

\begin{tikzpicture}

  \usetikzlibrary{positioning};
  \usetikzlibrary{arrows.meta};

  \tikzset{> = {Straight Barb}};

  \node (root);
  \node [draw, above = of root] (x) {$x = 1$};
  \node [draw, below = of root] (y) {$y = 2$};
  \node [draw, right = 10em of x] (a) {$a = x + y = 3$};
  \node [draw, right = 10em of y] (b) {$b = y + 3 = 5$};
  \node [draw, right = 25em of root] (c) {$c = ab = 15$};

  \draw[->] (x.east) -- (a.west)
  node [midway, above]
  {$\frac{\partial a}{\partial x} = 1$};
  \draw[->] (y.east) -- (b.west)
  node [midway, below]
  {$\frac{\partial b}{\partial y} = 1$};

  \draw[->] (x.east) -- (b.west)
  node [midway, sloped, below, xshift = 2em]
  {$\frac{\partial b}{\partial x} = 0$};
  \draw[->] (y.east) -- (a.west)
  node [midway, sloped, above, xshift = 2em]
  {$\frac{\partial a}{\partial y} = 1$};

  \draw[->] (a.east) -- (c.west)
  node [midway, sloped, above]
  {$\frac{\partial c}{\partial a} = 5$};
  \draw[->] (b.east) -- (c.west)
  node [midway, sloped, below]
  {$\frac{\partial c}{\partial b} = 3$};

\end{tikzpicture}
41a8009a-4603-4e44-b48e-94c32f57ba79.svg

© 2025 Rudolf Adamkovič under GNU General Public License version 3.
Made with Emacs and secret alien technologies of yesteryear.