Files
semestralka-latex/prezentacia/1.tex
2026-05-06 00:21:21 +02:00

60 lines
3.0 KiB
TeX

\begin{frame}{Schéma NN}
\centering
\begin{figure}[H]
\centering
\begin{tikzpicture}[scale=1.2, transform shape, node distance=0.8cm]
% Layer highlights
\fill[blue!10, rounded corners=5pt] (-0.5,-1.8) rectangle (0.5,1.8);
\fill[purple!10, rounded corners=5pt] (1.5,-1.8) rectangle (2.5,1.8);
\fill[purple!10, rounded corners=5pt] (3.5,-1.8) rectangle (4.5,1.8);
\fill[green!10, rounded corners=5pt] (5.5,-1.8) rectangle (6.5,1.8);
% Neural Network Structure
\begin{scope}[local bounding box=network]
% Layer labels
\node at (0,2) {\small Vstup};
\node at (2,2) {\small Skrytá 1};
\node at (4,2) {\small Skrytá 2};
\node at (6,2) {\small Výstupná};
% Input layer
\node[circle, draw=blue!60, fill=blue!20, minimum size=0.8cm, inner sep=0pt, text width=1.2em, align=center, font=\tiny] (I-1) at (0,1) {$V_{\text{out}}$};
\node[circle, draw=blue!60, fill=blue!20, minimum size=0.8cm, inner sep=0pt, text width=1.2em, align=center, font=\tiny] (I-2) at (0,0) {$I_L$};
\node[circle, draw=blue!60, fill=blue!20, minimum size=0.8cm, inner sep=0pt, text width=1.2em, align=center, font=\scriptsize] (I-3) at (0,-1) {$e$};
% Hidden layers (unchanged, no labels)
\node[circle, draw=purple!60, fill=purple!20, minimum size=0.8cm] (H1-1) at (2,1) {};
\node[circle, draw=purple!60, fill=purple!20, minimum size=0.8cm] (H1-2) at (2,0.3) {};
\node at (2,-0.5) {$\vdots$};
\node[circle, draw=purple!60, fill=purple!20, minimum size=0.8cm] (H1-3) at (2,-1.3) {};
\node[circle, draw=purple!60, fill=purple!20, minimum size=0.8cm] (H2-1) at (4,1) {};
\node[circle, draw=purple!60, fill=purple!20, minimum size=0.8cm] (H2-2) at (4,0.3) {};
\node at (4,-0.5) {$\vdots$};
\node[circle, draw=purple!60, fill=purple!20, minimum size=0.8cm] (H2-3) at (4,-1.3) {};
% Output layer
\node[circle, draw=green!60, fill=green!20, minimum size=0.8cm, inner sep=0pt, text width=1.2em, align=center, font=\tiny] (O-1) at (6,0) {$D$};
% Connections
\foreach \i in {1,2,3} {
\draw[->, gray] (I-\i) -- (H1-1) node[midway, above, sloped, font=\tiny] {\ifnum\i=1 $w_{1,1}$\fi};
\draw[->, gray] (I-\i) -- (H1-2);
\draw[->, gray] (I-\i) -- (H1-3);
}
\foreach \i in {1,2,3} {
\foreach \j in {1,2,3} {
\draw[->, gray] (H1-\i) -- (H2-\j);
}
}
\foreach \i in {1,2,3} {
\draw[->, gray] (H2-\i) -- (O-1);
}
\end{scope}
\end{tikzpicture}
\caption{Neurónová sieť o 3 vstupoch, dvoch skrytých vrstvách a jednej výstupnej vrstve}
%\label{fig:nn_graph}
\end{figure}
\end{frame}