PlotNeuralNet resnet34和resnet18绘图

news2025/2/28 20:36:25

文章目录

    • resnet18
    • resnet34

PlotNeuralNet网络

在这里插入图片描述可以发现,resnet34和resnet18只有块的数量不一样,经过简单的修改即可得到

resnet18


\documentclass[border=12pt, multi, tikz]{standalone}
\usepackage[fontsize=14pt]{fontsize}
\usepackage{import}
\subimport{./layers/}{init}
\usetikzlibrary{positioning}
\usetikzlibrary{3d} %for including external image 

\def\ConvColor{rgb:yellow,5;red,2.5;white,5}
\def\ConvReluColor{rgb:yellow,5;red,5}
\def\bnColor{rgb:yellow,5;red,5}
\def\PoolColor{rgb:red,1;black,0}
\def\UnpoolColor{rgb:blue,2;green,1;black,0.3}
\def\FcColor{rgb:blue,5;red,2.5;white,5}
\def\FcReluColor{rgb:blue,5;red,5;white,4}
\def\SoftmaxColor{rgb:magenta,5;black,7}
\def\SumColor{rgb:blue,5;green,15}
\def\LayerColor{rgb:black,1}

\newcommand{\copymidarrow}{\tikz \draw[-Stealth,line width =1mm,draw={rgb:blue,4;red,1;green,1;black,3}] (-0.3,0) -- ++(0.3,0);}


\begin{document}
\noindent
\begin{tikzpicture}
	\tikzstyle{connection}=[ultra thick,every node/.style={sloped,allow upside down},draw=\edgecolor,opacity=0.7]
	\tikzstyle{copyconnection}=[ultra thick,every node/.style={sloped,allow upside down},draw={rgb:blue,4;red,1;green,1;black,3},opacity=0.7]

	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%% Draw Encoder
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\node[canvas is zy plane at x=0](temp) at (-3.5,0,0) {\includegraphics[width=-20cm,height=20cm]{pics/03-LC-ser-sub-20-mirror}};
	\path (-4,0,0);
	% input
	\pic[shift={(0,0,0)}] at (0,0,0) {
		Box={
				name=input,
				caption=Input,
				xlabel= 3,
				ylabel=224,
				zlabel= \qquad 224,
				fill=\ConvColor,
				height=100,
				width=0.1,
				depth=100
			}
	};
	% conv1
	\pic[shift={(1.5,0,0)}] at (input-east) {
		RightBandedBox={
				name= conv1,
				caption=Conv1,
				xlabel={{"64",""}},
				ylabel=112,
				zlabel= \qquad 112,
				fill=\ConvColor,
				bandfill=\ConvReluColor,
				height=50,
				width=2.1,
				depth=50
			}
	};
	% MaxPool2d
	\pic[shift={(1,0,0)}] at (conv1-east) {
		RightBandedBox={
			name= MaxPool,
			xlabel={{"64",""}},
			ylabel=112,
			fill=\PoolColor,
			height=50,
			width=2.1,
			depth=50
		}
	};



	% layer1
	% conv1_1
	\pic[shift={(3,0,0)}] at (MaxPool-east) {
		RightBandedBox={
				name= conv1_1,
				xlabel={{"64",""}},
				ylabel= 112,
				fill=\ConvColor,
				bandfill=\ConvReluColor,
				height=50,
				width=2.1,
				depth=50
			}
	};
	% conv1_2
	\pic[shift={(0,0,0)}] at (conv1_1-east) {
		RightBandedBox={
				name= conv1_2,
				xlabel={{"\quad 64",""}},
				zlabel= \qquad 112,
				fill=\ConvColor,
				bandfill=\ConvReluColor,
				height=50,
				width=2.1,
				depth=50
			}
	};
	% conv1_3
	\pic[shift={(0,0,0)}] at (conv1_2-east) {
		RightBandedBox={
				name= conv1_3,
				xlabel={{"\quad 256",""}},
				zlabel= \qquad 112,
				fill=\ConvColor,
				bandfill=\ConvReluColor,
				height=50,
				width=8.4,
				depth=50
			}
	};
	% add1_1
	\pic[shift={(2,0,0)}] at (conv1_3-east) {
		Ball={
				name=add1_1,
				fill=\SumColor,
				opacity=0.6,
				radius=2,
				logo=\(+\)
			}
	};
\pic[shift={(-0.2,0,1)}] at (conv1_1-west) {Box={name=env,caption=\textbf{\large{$\times$ 2}},%
		xlabel={{"","dummy"}},fill=,opacity=0.1,height=60,width={18.4},depth=60}};

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\pic[shift={(4,0,0)}] at (conv1_3-east) {
		RightBandedBox={
			name= conv2_1,
			xlabel={{"128",""}},
			ylabel= 56,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=25,
			width=4.2,
			depth=25
		}
	};
	% conv2_2
	\pic[shift={(0,0,0)}] at (conv2_1-east) {
		RightBandedBox={
			name= conv2_2,
			xlabel={{"128",""}},
			zlabel= \qquad 56,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=25,
			width=4.2,
			depth=25
		}
	};
	% conv2_3
	\pic[shift={(0,0,0)}] at (conv2_2-east) {
		RightBandedBox={
			name= conv2_3,
			xlabel={{"512",""}},
			zlabel= \qquad 56,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=25,
			width=16.8,
			depth=25
		}
	};

	% add1_2
	\pic[shift={(2,0,0)}] at (conv2_3-east) {
		Ball={
			name=add1_2,
			fill=\SumColor,
			opacity=0.6,
			radius=2,
			logo=\(+\)
		}
	};
\pic[shift={(-0.4,0,1)}] at (conv2_1-west) {Box={name=env,caption=\textbf{\large{$\times$ 2}},%
		xlabel={{"","dummy"}},fill=,opacity=0.1,height=30,width={36.8},depth=30}};

	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	% conv3_1
	\pic[shift={(4,0,0)}] at (conv2_3-east) {
		RightBandedBox={
			name= conv3_1,
			xlabel={{"256",""}},
			ylabel= 28,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=12.5,
			width=8.4,
			depth=12.5
		}
	};
	% conv3_2
	\pic[shift={(0,0,0)}] at (conv3_1-east) {
		RightBandedBox={
		name= conv3_2,
		xlabel={{"256",""}},
		zlabel= 28,
		fill=\ConvColor,
		bandfill=\ConvReluColor,
		height=12.5,
		width=8.4,
		depth=12.5
		}
	};
	% conv3_3
	\pic[shift={(0,0,0)}] at (conv3_2-east) {
		RightBandedBox={
		name= conv3_3,
		xlabel={{"1024",""}},
		zlabel= 28,
		fill=\ConvColor,
		bandfill=\ConvReluColor,
		height=12.5,
		width=33.6,
		depth=12.5
		}
	};
	
	% add1_3
	\pic[shift={(2,0,0)}] at (conv3_3-east) {
		Ball={
			name=add1_3,
			fill=\SumColor,
			opacity=0.6,
			radius=2,
			logo=\(+\)
		}
	};
\pic[shift={(-0.6,0,1)}] at (conv3_1-west) {Box={name=env,caption=\textbf{\large{$\times$ 2}},%
		xlabel={{"","dummy"}},fill=,opacity=0.1,height=20,width={63.6},depth=20}};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	% conv4_1
	\pic[shift={(4,0,0)}] at (conv3_3-east) {
		RightBandedBox={
			name= conv4_1,
			xlabel={{"512",""}},
			ylabel= 14,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=6.25,
			width=16.8,
			depth=6.25
		}
	};
	% conv4_2
	\pic[shift={(0,0,0)}] at (conv4_1-east) {
		RightBandedBox={
			name= conv4_2,
			xlabel={{"512",""}},
			ylabel= 14,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=6.25,
			width=16.8,
			depth=6.25
		}
	};
	% conv4_3
	\pic[shift={(0,0,0)}] at (conv4_2-east) {
		RightBandedBox={
			name= conv4_3,
			xlabel={{"2048",""}},
			ylabel= 14,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=6.25,
			width=67.2,
			depth=6.25
		}
	};
	% add1_4
	\pic[shift={(2,0,0)}] at (conv4_3-east) {
		Ball={
			name=add1_4,
			fill=\SumColor,
			opacity=0.6,
			radius=2,
			logo= \(+\)
		}
	};
\pic[shift={(-0.8,0,0)}] at (conv4_1-west) {Box={name=env,caption=\textbf{\large{$\times$ 2}},%
		xlabel={{"","dummy"}},fill=,opacity=0.1,height=15,width={110.2},depth=15}};

	% avgpool
\pic[shift={(4,0,0)}] at (add1_4-east) {
	Box={
		name=avgpool,
		caption= \\ avgpool,
		xlabel={{"1",""}},
		ylabel=1,
		zlabel=\qquad 2048,
		fill=\PoolColor,
		height=2,
		width=2,
		depth=200
	}
};


	% fullconnection
	\pic[shift={(2,0,0)}] at (avgpool-east) {
		RightBandedBox={
				name=fc,
				caption=\makebox[0pt]{
					 \shortstack[c]{\\ full \, connection\\softmax}},
				xlabel={{"1",""}},
				zlabel=\qquad 128,
				fill=\FcColor,
				bandfill=\SoftmaxColor,
				height=2,
				width=2,
				depth=20
			}
	};

	% connections
	\draw [connection]  		(input-east)			-- 	node {\midarrow} 	(conv1-west);
	\draw [connection]  		(conv1-east)			-- 	node {\midarrow} 	(MaxPool-west);
	\draw [connection] (MaxPool-east) -- node {\midarrow} (conv1_1-west);


	% connections shortcut
	% conv1 to add1_1
	\path (MaxPool-east) -- (conv1_1-west) coordinate[pos=0.5] (pool_conv1_1);
	\path (pool_conv1_1) ++ (0,5,0) coordinate (pool_conv1_1_above);
	\path (add1_1-north) ++ (0,5,0) coordinate (add1_1-north-above);
	
	\draw [connection] (pool_conv1_1) -- node {\midarrow} (pool_conv1_1_above|-add1_1-north-above) -- node {\midarrow} (add1_1-north-above) -- node {\midarrow} (add1_1-north);
	\draw [connection] (conv1_3-east) -- (add1_1-west);
	\draw [connection] (add1_1-east) -- node {\midarrow} (conv2_1-west);
	
	%
	\path (conv1_3-east) -- (conv2_1-west) coordinate[pos=0.65] (add_conv_1); % conv1 -> conv2
	\path (add_conv_1) ++ (0,5,0) coordinate (add_conv_1-above);
	\path (add1_2-north) ++ (0,5,0) coordinate (add1_2-north-above);
	\draw [connection] (add_conv_1) -- node {\midarrow} (add_conv_1-above|-add1_2-north-above) -- node {\midarrow} (add1_2-north-above) -- node {\midarrow} (add1_2-north);
	\draw [connection] (conv2_3-east) -- (add1_2-west);
	\draw [connection] (add1_2-east) -- node {\midarrow} (conv3_1-west);
	%%%%%%%%%%%%%%
	\path (conv2_3-east) -- (conv3_1-west) coordinate[pos=0.75] (add_conv_2);
	\path (add_conv_2) ++ (0,5,0) coordinate (add_conv_2-above);
	\path (add1_3-north) ++ (0,5,0) coordinate (add1_3-north-above);
	\draw [connection] (add_conv_2) -- node {\midarrow} (add_conv_2-above|-add1_3-north-above) -- node {\midarrow} (add1_3-north-above) -- node {\midarrow} (add1_3-north);
	\draw [connection] (conv3_3-east) -- (add1_3-west);
	\draw [connection] (add1_3-east) -- node {\midarrow} (conv4_1-west);
	%%%%%%%%%%%%%%%
	\path (conv3_3-east) -- (conv4_1-west) coordinate[pos=0.75] (add_conv_3);
	\path (add_conv_3) ++ (0,5,0) coordinate (add_conv_3-above);
	\path (add1_4-north) ++ (0,5,0) coordinate (add1_4-north-above);
	\draw [connection] (add_conv_3) -- node {\midarrow} (add_conv_3-above|-add1_4-north-above) -- node {\midarrow} (add1_4-north-above) -- node {\midarrow} (add1_4-north);
	\draw [connection] (conv4_3-east) -- (add1_4-west);
	%\draw [connection] (add1_4-east) -- node {\midarrow} (conv4_1-west);
\draw [connection](add1_4-east) -- node {\midarrow}(avgpool-west);
\draw [connection](avgpool-east) -- node {\midarrow}(fc-west);
	% pool & fullconnection
\draw	[densely dashed]  (avgpool-nearnortheast)    	--  									(fc-nearnorthwest);
\draw	[densely dashed]  (avgpool-nearsoutheast)    	--  									(fc-nearsouthwest);
\draw	[densely dashed]  (avgpool-farnortheast)    	--  									(fc-farnorthwest);
\draw	[densely dashed]  (avgpool-farsoutheast)    	--  									(fc-farsouthwest);
%
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{tikzpicture}
\end{document}

resnet34

参考链接

\documentclass[border=12pt, multi, tikz]{standalone}
\usepackage[fontsize=14pt]{fontsize}
\usepackage{import}
\subimport{./layers/}{init}
\usetikzlibrary{positioning}
\usetikzlibrary{3d} %for including external image 

\def\ConvColor{rgb:yellow,5;red,2.5;white,5}
\def\ConvReluColor{rgb:yellow,5;red,5}
\def\bnColor{rgb:yellow,5;red,5}
\def\PoolColor{rgb:red,1;black,0}
\def\UnpoolColor{rgb:blue,2;green,1;black,0.3}
\def\FcColor{rgb:blue,5;red,2.5;white,5}
\def\FcReluColor{rgb:blue,5;red,5;white,4}
\def\SoftmaxColor{rgb:magenta,5;black,7}
\def\SumColor{rgb:blue,5;green,15}
\def\LayerColor{rgb:black,1}

\newcommand{\copymidarrow}{\tikz \draw[-Stealth,line width =1mm,draw={rgb:blue,4;red,1;green,1;black,3}] (-0.3,0) -- ++(0.3,0);}


\begin{document}
\noindent
\begin{tikzpicture}
	\tikzstyle{connection}=[ultra thick,every node/.style={sloped,allow upside down},draw=\edgecolor,opacity=0.7]
	\tikzstyle{copyconnection}=[ultra thick,every node/.style={sloped,allow upside down},draw={rgb:blue,4;red,1;green,1;black,3},opacity=0.7]

	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%% Draw Encoder
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\node[canvas is zy plane at x=0](temp) at (-3.5,0,0) {\includegraphics[width=-20cm,height=20cm]{pics/03-LC-ser-sub-20-mirror}};
	\path (-4,0,0);
	% input
	\pic[shift={(0,0,0)}] at (0,0,0) {
		Box={
				name=input,
				caption=Input,
				xlabel= 3,
				ylabel=224,
				zlabel= \qquad 224,
				fill=\ConvColor,
				height=100,
				width=0.1,
				depth=100
			}
	};
	% conv1
	\pic[shift={(1.5,0,0)}] at (input-east) {
		RightBandedBox={
				name= conv1,
				caption=Conv1,
				xlabel={{"64",""}},
				ylabel=112,
				zlabel= \qquad 112,
				fill=\ConvColor,
				bandfill=\ConvReluColor,
				height=50,
				width=2.1,
				depth=50
			}
	};
	% MaxPool2d
	\pic[shift={(1,0,0)}] at (conv1-east) {
		RightBandedBox={
			name= MaxPool,
			xlabel={{"64",""}},
			ylabel=112,
			fill=\PoolColor,
			height=50,
			width=2.1,
			depth=50
		}
	};



	% layer1
	% conv1_1
	\pic[shift={(3,0,0)}] at (MaxPool-east) {
		RightBandedBox={
				name= conv1_1,
				xlabel={{"64",""}},
				ylabel= 112,
				fill=\ConvColor,
				bandfill=\ConvReluColor,
				height=50,
				width=2.1,
				depth=50
			}
	};
	% conv1_2
	\pic[shift={(0,0,0)}] at (conv1_1-east) {
		RightBandedBox={
				name= conv1_2,
				xlabel={{"\quad 64",""}},
				zlabel= \qquad 112,
				fill=\ConvColor,
				bandfill=\ConvReluColor,
				height=50,
				width=2.1,
				depth=50
			}
	};
	% conv1_3
	\pic[shift={(0,0,0)}] at (conv1_2-east) {
		RightBandedBox={
				name= conv1_3,
				xlabel={{"\quad 256",""}},
				zlabel= \qquad 112,
				fill=\ConvColor,
				bandfill=\ConvReluColor,
				height=50,
				width=8.4,
				depth=50
			}
	};
	% add1_1
	\pic[shift={(2,0,0)}] at (conv1_3-east) {
		Ball={
				name=add1_1,
				fill=\SumColor,
				opacity=0.6,
				radius=2,
				logo=\(+\)
			}
	};
\pic[shift={(-0.2,0,1)}] at (conv1_1-west) {Box={name=env,caption=\textbf{\large{$\times$ 3}},%
		xlabel={{"","dummy"}},fill=,opacity=0.1,height=60,width={18.4},depth=60}};

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\pic[shift={(4,0,0)}] at (conv1_3-east) {
		RightBandedBox={
			name= conv2_1,
			xlabel={{"128",""}},
			ylabel= 56,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=25,
			width=4.2,
			depth=25
		}
	};
	% conv2_2
	\pic[shift={(0,0,0)}] at (conv2_1-east) {
		RightBandedBox={
			name= conv2_2,
			xlabel={{"128",""}},
			zlabel= \qquad 56,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=25,
			width=4.2,
			depth=25
		}
	};
	% conv2_3
	\pic[shift={(0,0,0)}] at (conv2_2-east) {
		RightBandedBox={
			name= conv2_3,
			xlabel={{"512",""}},
			zlabel= \qquad 56,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=25,
			width=16.8,
			depth=25
		}
	};

	% add1_2
	\pic[shift={(2,0,0)}] at (conv2_3-east) {
		Ball={
			name=add1_2,
			fill=\SumColor,
			opacity=0.6,
			radius=2,
			logo=\(+\)
		}
	};
\pic[shift={(-0.4,0,1)}] at (conv2_1-west) {Box={name=env,caption=\textbf{\large{$\times$ 4}},%
		xlabel={{"","dummy"}},fill=,opacity=0.1,height=30,width={36.8},depth=30}};

	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	% conv3_1
	\pic[shift={(4,0,0)}] at (conv2_3-east) {
		RightBandedBox={
			name= conv3_1,
			xlabel={{"256",""}},
			ylabel= 28,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=12.5,
			width=8.4,
			depth=12.5
		}
	};
	% conv3_2
	\pic[shift={(0,0,0)}] at (conv3_1-east) {
		RightBandedBox={
		name= conv3_2,
		xlabel={{"256",""}},
		zlabel= 28,
		fill=\ConvColor,
		bandfill=\ConvReluColor,
		height=12.5,
		width=8.4,
		depth=12.5
		}
	};
	% conv3_3
	\pic[shift={(0,0,0)}] at (conv3_2-east) {
		RightBandedBox={
		name= conv3_3,
		xlabel={{"1024",""}},
		zlabel= 28,
		fill=\ConvColor,
		bandfill=\ConvReluColor,
		height=12.5,
		width=33.6,
		depth=12.5
		}
	};
	
	% add1_3
	\pic[shift={(2,0,0)}] at (conv3_3-east) {
		Ball={
			name=add1_3,
			fill=\SumColor,
			opacity=0.6,
			radius=2,
			logo=\(+\)
		}
	};
\pic[shift={(-0.6,0,1)}] at (conv3_1-west) {Box={name=env,caption=\textbf{\large{$\times$ 23}},%
		xlabel={{"","dummy"}},fill=,opacity=0.1,height=20,width={63.6},depth=20}};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	% conv4_1
	\pic[shift={(4,0,0)}] at (conv3_3-east) {
		RightBandedBox={
			name= conv4_1,
			xlabel={{"512",""}},
			ylabel= 14,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=6.25,
			width=16.8,
			depth=6.25
		}
	};
	% conv4_2
	\pic[shift={(0,0,0)}] at (conv4_1-east) {
		RightBandedBox={
			name= conv4_2,
			xlabel={{"512",""}},
			ylabel= 14,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=6.25,
			width=16.8,
			depth=6.25
		}
	};
	% conv4_3
	\pic[shift={(0,0,0)}] at (conv4_2-east) {
		RightBandedBox={
			name= conv4_3,
			xlabel={{"2048",""}},
			ylabel= 14,
			fill=\ConvColor,
			bandfill=\ConvReluColor,
			height=6.25,
			width=67.2,
			depth=6.25
		}
	};
	% add1_4
	\pic[shift={(2,0,0)}] at (conv4_3-east) {
		Ball={
			name=add1_4,
			fill=\SumColor,
			opacity=0.6,
			radius=2,
			logo= \(+\)
		}
	};
\pic[shift={(-0.8,0,0)}] at (conv4_1-west) {Box={name=env,caption=\textbf{\large{$\times$ 3}},%
		xlabel={{"","dummy"}},fill=,opacity=0.1,height=15,width={110.2},depth=15}};

	% avgpool
\pic[shift={(4,0,0)}] at (add1_4-east) {
	Box={
		name=avgpool,
		caption= \\ avgpool,
		xlabel={{"1",""}},
		ylabel=1,
		zlabel=\qquad 2048,
		fill=\PoolColor,
		height=2,
		width=2,
		depth=200
	}
};


	% fullconnection
	\pic[shift={(2,0,0)}] at (avgpool-east) {
		RightBandedBox={
				name=fc,
				caption=\makebox[0pt]{
					 \shortstack[c]{\\ full \, connection\\softmax}},
				xlabel={{"1",""}},
				zlabel=\qquad 3,
				fill=\FcColor,
				bandfill=\SoftmaxColor,
				height=2,
				width=2,
				depth=20
			}
	};

	% connections
	\draw [connection]  		(input-east)			-- 	node {\midarrow} 	(conv1-west);
	\draw [connection]  		(conv1-east)			-- 	node {\midarrow} 	(MaxPool-west);
	\draw [connection] (MaxPool-east) -- node {\midarrow} (conv1_1-west);


	% connections shortcut
	% conv1 to add1_1
	\path (MaxPool-east) -- (conv1_1-west) coordinate[pos=0.5] (pool_conv1_1);
	\path (pool_conv1_1) ++ (0,5,0) coordinate (pool_conv1_1_above);
	\path (add1_1-north) ++ (0,5,0) coordinate (add1_1-north-above);
	
	\draw [connection] (pool_conv1_1) -- node {\midarrow} (pool_conv1_1_above|-add1_1-north-above) -- node {\midarrow} (add1_1-north-above) -- node {\midarrow} (add1_1-north);
	\draw [connection] (conv1_3-east) -- (add1_1-west);
	\draw [connection] (add1_1-east) -- node {\midarrow} (conv2_1-west);
	
	%
	\path (conv1_3-east) -- (conv2_1-west) coordinate[pos=0.65] (add_conv_1); % conv1 -> conv2
	\path (add_conv_1) ++ (0,5,0) coordinate (add_conv_1-above);
	\path (add1_2-north) ++ (0,5,0) coordinate (add1_2-north-above);
	\draw [connection] (add_conv_1) -- node {\midarrow} (add_conv_1-above|-add1_2-north-above) -- node {\midarrow} (add1_2-north-above) -- node {\midarrow} (add1_2-north);
	\draw [connection] (conv2_3-east) -- (add1_2-west);
	\draw [connection] (add1_2-east) -- node {\midarrow} (conv3_1-west);
	%%%%%%%%%%%%%%
	\path (conv2_3-east) -- (conv3_1-west) coordinate[pos=0.75] (add_conv_2);
	\path (add_conv_2) ++ (0,5,0) coordinate (add_conv_2-above);
	\path (add1_3-north) ++ (0,5,0) coordinate (add1_3-north-above);
	\draw [connection] (add_conv_2) -- node {\midarrow} (add_conv_2-above|-add1_3-north-above) -- node {\midarrow} (add1_3-north-above) -- node {\midarrow} (add1_3-north);
	\draw [connection] (conv3_3-east) -- (add1_3-west);
	\draw [connection] (add1_3-east) -- node {\midarrow} (conv4_1-west);
	%%%%%%%%%%%%%%%
	\path (conv3_3-east) -- (conv4_1-west) coordinate[pos=0.75] (add_conv_3);
	\path (add_conv_3) ++ (0,5,0) coordinate (add_conv_3-above);
	\path (add1_4-north) ++ (0,5,0) coordinate (add1_4-north-above);
	\draw [connection] (add_conv_3) -- node {\midarrow} (add_conv_3-above|-add1_4-north-above) -- node {\midarrow} (add1_4-north-above) -- node {\midarrow} (add1_4-north);
	\draw [connection] (conv4_3-east) -- (add1_4-west);
	%\draw [connection] (add1_4-east) -- node {\midarrow} (conv4_1-west);
\draw [connection](add1_4-east) -- node {\midarrow}(avgpool-west);
\draw [connection](avgpool-east) -- node {\midarrow}(fc-west);
	% pool & fullconnection
\draw	[densely dashed]  (avgpool-nearnortheast)    	--  									(fc-nearnorthwest);
\draw	[densely dashed]  (avgpool-nearsoutheast)    	--  									(fc-nearsouthwest);
\draw	[densely dashed]  (avgpool-farnortheast)    	--  									(fc-farnorthwest);
\draw	[densely dashed]  (avgpool-farsoutheast)    	--  									(fc-farsouthwest);
%
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{tikzpicture}
\end{document}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1030416.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Spark 【分区与并行度】

RDD 并行度和分区 SparkConf setMaster("local[*]") 我们在创建 SparkContext 对象时通常会指定 SparkConf 参数,它包含了我们运行时的配置信息。如果我们的 setMaster 中的参数是 "local[*]" 时,通常代表使用的CPU核数为当前环境…

DevOps与CI/CD常见面试问题汇总

01 您能告诉我们DevOps和Agile(敏捷)之间的根本区别吗? 答:尽管DevOps与敏捷方法(这是最流行的SDLC[Software Development Life Cycle]方法之一)有一些相似之处,但两者在软件开发方面都是根本不同的方法。以下是两者之…

mysql 在eclipse在配置

一、在Windows(窗口)/Preferences(首选项)/Java/Build path(构建路径)/User Library(用户库)里面直接把建一个Mysql, 二、Add External JARs… 添加mysql-connector-java…

python学习之【with语句】

前言 上一篇文章 ​ ​python学习之【文件读写】​​​ 中我们学习了python当中的文件读写,这篇文章接着学习python中文件读写的with语句。 了解with语句 在很多场景中,通过使用with语句可以让我们可以更好地来管理资源和简化代码,它可以看…

洛谷刷题入门篇:顺序结构

链接如下:https://www.luogu.com.cn/training/100#problems 一、Hello,World! 题目链接:https://www.luogu.com.cn/problem/B2002 题目描述 编写一个能够输出 Hello,World! 的程序。 提示: 使用英文标点符号;Hello,World! 逗…

Windows下,快速部署开发环境,第三方库管理,以及项目迁移工具介绍

对于在windows下做c开发的同学,你是否有以下痛点?: 1.每次构建c项目,搭配第三方库环境,都要不停的include,lib,dll等配置,如果4-5个还好,要是10几个...人都麻了... 2.一个环境也无所谓,问题x64/32位系统,Debug,Release都要配置一遍..每次配置…

【C# Programming】值类型、良构类型

值类型 1、值类型 值类型的变量直接包含值。换言之, 变量引用的位置就是值内存中实际存储的位置。 2、引用类型 引用类型的变量存储的是对一个对象实例的引用(通常为内存地址)。 复制引用类型的值时,复制的只是引用。这个引用非常小&#xf…

CentOS安装openjdk和elasticsearch

CentOS安装openjdk 文章目录 CentOS安装openjdk一、yum1.1search1.2安装openjdk 二、elasticsearch的启动和关闭2.1启动2.2关闭2.3添加服务 一、yum 1.1search yum search java | grep jdk1.2安装openjdk [roottest ~]# yum install java-1.8.0-openjdk -y 查看openjdk版本 …

校园学习《乡村振兴战略下传统村落文化旅游设计》 许少辉瑞博士生辉少许

校园学习《乡村振兴战略下传统村落文化旅游设计》 许少辉瑞博士生辉少许

无线定位中TDOA时延估计算法matlab仿真

目录 1.算法运行效果图预览 2.算法运行软件版本 3.部分核心程序 4.算法理论概述 5.算法完整程序工程 1.算法运行效果图预览 2.算法运行软件版本 matlab2022a 3.部分核心程序 ...................................................................figure; plot(P1x,P1y…

JeecgBoot v3.5.5 版本发布,性能大升级版本—开源免费的低代码开发平台

项目介绍 JeecgBoot是一款企业级的低代码平台!前后端分离架构 SpringBoot2.x,SpringCloud,Ant Design&Vue3,Mybatis-plus,Shiro,JWT 支持微服务。强大的代码生成器让前后端代码一键生成! JeecgBoot引领…

【Java毕设项目】基于SpringBoot+Vue科研管理系统的设计与实现

博主主页:一季春秋博主简介:专注Java技术领域和毕业设计项目实战、Java、微信小程序、安卓等技术开发,远程调试部署、代码讲解、文档指导、ppt制作等技术指导。主要内容:毕业设计(Java项目、小程序等)、简历模板、学习资料、面试题…

JAVAEE初阶相关内容第十二弹--多线程(进阶)

目录 一、JUC的常见类 1、Callable接口 1.1callable与runnable 1.2代码实例 (1)不使用Callable实现 (2)使用Callable实现 1.3理解Callable 1.4理解FutureTask 2、ReentrantLock 2.1ReentrantLock的用法 2.2ReentrantLoc…

BaseMapper 中的方法

BaseMapper 中的方法&#xff1a; 插入 int insert(T entity) - 插入一条记录。 删除 int deleteById(Serializable id) - 根据主键ID删除记录。 int deleteById(T entity) - 根据实体对象&#xff08;ID&#xff09;删除记录。 int deleteByMap(Map<String, Object> …

快速用Python进行数据分析技巧详解

概要 一些小提示和小技巧可能是非常有用的&#xff0c;特别是在编程领域。有时候使用一点点黑客技术&#xff0c;既可以节省时间&#xff0c;还可能挽救“生命”。 一个小小的快捷方式或附加组件有时真是天赐之物&#xff0c;并且可以成为真正的生产力助推器。所以&#xff0…

【SpringCloud】微服务技术栈入门1 - 远程服务调用、Eureka以及Ribbon

目录 远程服务调用RestTemplate Eureka简要概念配置 Eureka 环境设置 Eureka ClientEureka 服务发现 Ribbon工作流程配置与使用 Ribbon饥饿加载 远程服务调用 RestTemplate RestTemplate 可以模拟客户端来向另外一个后端执行请求 黑马给出的微服务项目中&#xff0c;有两个 …

漏刻有时数据可视化Echarts组件开发(28):异形柱图、pictorialBar和dataZoom组件的使用

构建容器 var dom document.getElementById(container);var myChart echarts.init(dom, null, {renderer: canvas,useDirtyRect: false});模拟数据 var dataList [{name: 班级一, value: 120, max: 120, min: 20},{name: 班级二, value: 183, max: 200, min: 20},{name: 班级…

Windows如何删除“$WINDOWS.~BT“文件夹,解决权限不足无法删除

$WINDOWS.~BT是干嘛的 $Windows.BT是升级或者安装Windows操作系统中间过程中产生的临时文件夹&#xff0c;一般用于保存下载后的升级文件&#xff0c;或者安装过程中复制文件时产生的。用于保存Windows安装记录, 包括配置资料, 错误报告等, 如果安装失败便可反馈给微软公司&am…

pytorch学习3(pytorch手写数字识别练习)

网络模型 设置三层网络&#xff0c;一般最后一层激活函数不选择relu 任务步骤 手写数字识别任务共有四个步骤&#xff1a; 1、数据加载--Load Data 2、构建网络--Build Model 3、训练--Train 4、测试--Test实战 1、导入各种需要的包 import torch from torch import nn f…

Matlab图像处理-区域特征

凹凸性 设P是图像子集S中的点&#xff0c;若通过的每条直线只与S相交一次&#xff0c;则称S为发自P的星形&#xff0c;也就是站在P点能看到S的所有点。 满足下列条件之一&#xff0c;称此为凸状的&#xff1a; 1.从S中每点看&#xff0c;S都是星形的&#xff1b; 2.对S中任…