69 lines
2.8 KiB
TeX
69 lines
2.8 KiB
TeX
\begin{tikzpicture}
|
|
\node[circle,thick,draw=red!60,fill=blue!20,minimum size=5mm,anchor=center] (inode0) at (0,0) {$i_0$};
|
|
\node[circle,thick,draw=red!60,fill=blue!30,minimum size=5mm] (inode1) [below of=inode0] {$i_1$};
|
|
\node[circle,thick,draw=red!60,fill=blue!40,minimum size=5mm] (inode2) [below of=inode1] {$i_2$};
|
|
\node[circle,thick,draw=red!60,fill=blue!50,minimum size=5mm] (inode3) [below of=inode2] {$i_3$};
|
|
|
|
\node[circle,draw=black,fill=ForestGreen!20,minimum size=5mm,anchor=center] (onode0) at (2cm,0.5cm) {$o_0$};
|
|
\node[circle,thick,draw=red!60,fill=ForestGreen!30,minimum size=5mm] (onode1) [below of=onode0] {$o_1$};
|
|
\node[circle,draw=black,fill=ForestGreen!40,minimum size=5mm] (onode2) [below of=onode1] {$o_2$};
|
|
\node[circle,draw=black,fill=ForestGreen!50,minimum size=5mm] (onode3) [below of=onode2] {$o_3$};
|
|
\node[circle,draw=black,fill=ForestGreen!60,minimum size=5mm] (onode4) [below of=onode3] {$o_4$};
|
|
|
|
\draw (inode0.east) to (onode0.west);
|
|
\draw (inode1.east) to (onode0.west);
|
|
\draw (inode2.east) to (onode0.west);
|
|
\draw (inode3.east) to (onode0.west);
|
|
|
|
\draw (inode0.east) to (onode2.west);
|
|
\draw (inode1.east) to (onode2.west);
|
|
\draw (inode2.east) to (onode2.west);
|
|
\draw (inode3.east) to (onode2.west);
|
|
|
|
\draw (inode0.east) to (onode3.west);
|
|
\draw (inode1.east) to (onode3.west);
|
|
\draw (inode2.east) to (onode3.west);
|
|
\draw (inode3.east) to (onode3.west);
|
|
|
|
\draw (inode0.east) to (onode4.west);
|
|
\draw (inode1.east) to (onode4.west);
|
|
\draw (inode2.east) to (onode4.west);
|
|
\draw (inode3.east) to (onode4.west);
|
|
|
|
\draw[red!60,thick] (inode0.east) to (onode1.west);
|
|
\draw[red!60,thick] (inode1.east) to (onode1.west);
|
|
\draw[red!60,thick] (inode2.east) to (onode1.west);
|
|
\draw[red!60,thick] (inode3.east) to (onode1.west);
|
|
|
|
\matrix (matrix) [matrix of nodes,left delimiter=(,right delimiter=),right=1.5cm of onode2] {
|
|
$w_{0,0}$ & $w_{0,1}$ & $w_{0,2}$ & $w_{0,3}$ \\
|
|
$w_{1,0}$ & $w_{1,1}$ & $w_{1,2}$ & $w_{1,3}$ \\
|
|
$w_{2,0}$ & $w_{2,1}$ & $w_{2,2}$ & $w_{2,3}$ \\
|
|
$w_{3,0}$ & $w_{3,1}$ & $w_{3,2}$ & $w_{3,3}$ \\
|
|
$w_{4,0}$ & $w_{4,1}$ & $w_{4,2}$ & $w_{4,3}$ \\
|
|
};
|
|
|
|
\node (prod) [right=4mm of matrix] {$\times$};
|
|
|
|
\matrix (input_vector) [matrix of nodes,left delimiter=(,right delimiter=),right=4mm of prod] {
|
|
$i_{0}$ \\
|
|
$i_{1}$ \\
|
|
$i_{2}$ \\
|
|
$i_{3}$ \\
|
|
};
|
|
|
|
\node (eq) [right=4mm of input_vector] {$=$};
|
|
|
|
\matrix (output_vector) [matrix of nodes,left delimiter=(,right delimiter=),right=4mm of eq] {
|
|
$o_{0}$ \\
|
|
$o_{1}$ \\
|
|
$o_{2}$ \\
|
|
$o_{3}$ \\
|
|
$o_{4}$ \\
|
|
};
|
|
|
|
\node[draw,thick,red!60,rounded corners,inner sep=0,fit=(matrix-2-1) (matrix-2-4)] {};
|
|
\node[draw,thick,red!60,rounded corners,inner sep=0,fit=(input_vector-1-1) (input_vector-4-1)] {};
|
|
\node[draw,thick,red!60,rounded corners,inner sep=0,fit=(output_vector-2-1) (output_vector-2-1)] {};
|
|
\end{tikzpicture}
|