tikzpicture 的一些问题

tikzpicture 的一些问题

我不知道如何使用 tikpicture 包绘制下面两幅图:

enter image description here

请帮我画一下。非常感谢。

答案1

以下内容可以帮助您入门。

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,fit,decorations.pathreplacing}
\usepackage{schemabloc}

\begin{document}

\begin{tikzpicture}
\foreach \nn in {1,2,3,...,20}{
\node[draw,fill=red,minimum width=0.5em,minimum height=1.5em,inner sep=0] (n\nn) at ($(0.6*\nn,0)$){};
}
\node[fit=(n1) (n4),draw](input){};
\node[fit=(n5),draw](output){};
\draw [decorate,decoration={brace,amplitude=10pt},xshift=-4pt,yshift=0pt](input.north west) -- (input.north east) node [black,midway,above=1em] {NN Input};
\draw (output.north) --++(0,10pt)node[above=1em]{NN Output};
\end{tikzpicture}

\end{document}

enter image description here

相关内容