Edit and compile if you like:
\documentclass[tikz]{standalone}\usetikzlibrary{positioning}\def\layersep{2}\def\nodesep{1.5}\begin{document}\begin{tikzpicture}[node/.style={circle, draw, thick},]\foreach \y in {1,...,5}{\node[node] (i\y) at (0,\nodesep*\y) {};\node[node, right=\layersep of i\y] (h1\y) {};\node[node, right=\layersep of h1\y] (h2\y) {};}\node[node, right=\layersep of h22] (o1) {};\node[node, right=\layersep of h24] (o2) {};\foreach \source in {1,...,5}\foreach \dest in {1,...,5}{\path[-stealth, thick] (i\source) edge (h1\dest);\path[-stealth, thick] (h1\source) edge (h2\dest);}\foreach \source in {1,...,5}\foreach \dest in {1,2}\draw[-stealth, thick] (h2\source) -- (o\dest);\draw[-stealth, thick] (7.5,3*\nodesep) -- node[above,font=\Large\bfseries] {dropout} (9.5, 3*\nodesep);% Boundary\foreach \y in {1,...,5}\node[node, right=15em of h2\y] (di\y) {};\node[red,font=\huge] at (di1) {$\times$};\node[red,font=\huge] at (di3) {$\times$};\foreach \y in {1,...,5}
Click to download: dropout.tex
Open in Overleaf: dropout.tex
This file is available on tikz.netlify.app and on GitHub and is MIT licensed.
See more on the author page of Janosh Riebesell..