Update animation
Signed-off-by: Riccardo Finotello <riccardo.finotello@gmail.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
\usepackage{tikz}
|
||||
\usepackage{ifthen}
|
||||
\usepackage{physics}
|
||||
\usepackage{upgreek}
|
||||
|
||||
\newlength{\cell}
|
||||
\setlength{\cell}{1cm}
|
||||
@@ -17,37 +19,37 @@
|
||||
\begin{tikzpicture}
|
||||
|
||||
% draw main grid
|
||||
\draw[thick] (0,0) rectangle (10 * \cell, 12 * \cell);
|
||||
\draw[line width=1mm] (0,0) rectangle (10 * \cell, 12 * \cell);
|
||||
|
||||
\foreach \x in {0,...,9}
|
||||
{
|
||||
\foreach \y in {0,...,11}
|
||||
{
|
||||
\draw (\x * \cell, \y * \cell) rectangle (\x * \cell + \cell, \y * \cell + \cell);
|
||||
\draw[fill=orange!20, opacity=0.5] (\x * \cell, \y * \cell) rectangle (\x * \cell + \cell, \y * \cell + \cell);
|
||||
}
|
||||
}
|
||||
|
||||
\node[anchor=base] at (5 * \cell, -\cell) {INPUT};
|
||||
|
||||
% draw convolution
|
||||
\draw[thick, fill=red!20, opacity=0.5] (\n * \cell, 12 * \cell - \m * \cell) rectangle (\n * \cell + 3 * \cell, 12 * \cell - 3 * \cell - \m * \cell);
|
||||
|
||||
\draw[fill=red!20, opacity=0.5] (\n * \cell + 10 * \cell + \separation, 9 * \cell - \m * \cell) rectangle (\n * \cell + 10 * \cell + \separation + \cell, 9 * \cell + \cell - \m * \cell);
|
||||
|
||||
\draw[thick, red] (\n * \cell + 1.5 * \cell, 12 * \cell - \m * \cell) -- (\n * \cell + 10 * \cell + \separation + 0.5 * \cell, 10 * \cell - 0.5 * \cell - \m * \cell) -- (\n * \cell + 1.5 * \cell, 9 * \cell - \m * \cell);
|
||||
\node[anchor=base] at (5 * \cell, -\cell) {$a^{\qty{l}}$};
|
||||
|
||||
% draw filter
|
||||
\draw[thick] (10 * \cell + \separation, 0) rectangle (18 * \cell + \separation, 10 * \cell);
|
||||
\draw[line width=1mm] (10 * \cell + \separation, 0) rectangle (18 * \cell + \separation, 10 * \cell);
|
||||
|
||||
\foreach \x in {0,...,7}
|
||||
{
|
||||
\foreach \y in {0,...,9}
|
||||
{
|
||||
\draw (10 * \cell + \separation + \x * \cell, \y * \cell) rectangle (10 * \cell + \separation + \x * \cell + \cell, \y * \cell + \cell);
|
||||
\draw[fill=orange!20, opacity=0.5] (10 * \cell + \separation + \x * \cell, \y * \cell) rectangle (10 * \cell + \separation + \x * \cell + \cell, \y * \cell + \cell);
|
||||
}
|
||||
}
|
||||
|
||||
\node[anchor=base] at (10 * \cell + \separation + 4 * \cell, -\cell) {OUTPUT};
|
||||
% draw convolution
|
||||
\draw[line width=0.5mm, red, fill=red!30, opacity=0.5] (\n * \cell, 12 * \cell - \m * \cell) rectangle (\n * \cell + 3 * \cell, 12 * \cell - 3 * \cell - \m * \cell);
|
||||
|
||||
\draw[line width=0.5mm, red, fill=red!30, opacity=0.5] (\n * \cell + 10 * \cell + \separation, 9 * \cell - \m * \cell) rectangle (\n * \cell + 10 * \cell + \separation + \cell, 9 * \cell + \cell - \m * \cell);
|
||||
|
||||
\draw[thick, red] (\n * \cell + 1.5 * \cell, 12 * \cell - \m * \cell) -- (\n * \cell + 10 * \cell + \separation + 0.5 * \cell, 10 * \cell - 0.5 * \cell - \m * \cell) -- (\n * \cell + 1.5 * \cell, 9 * \cell - \m * \cell);
|
||||
|
||||
\node[anchor=base] at (10 * \cell + \separation + 4 * \cell, -\cell) {$\upphi^{-1}\qty(a^{\qty{l+1}})$};
|
||||
\end{tikzpicture}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user