Files
plot-neural-networks/layers/SigmaSum.sty
T
Haris Iqbal 96b641bc26 Initialize
2018-09-12 17:13:15 +02:00

43 lines
1.7 KiB
TeX

\ProvidesPackage{SigmaSum}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%This Block can draw Reduction sum operations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tikzset{SigmaSum/.pic={\tikzset{/block/.cd,#1}
\draw (0,0,0) circle [radius=\SphereRadius] node[scale=4*\SphereRadius] {$\Sigma$};
\draw (0,0,0) coordinate (\cubeblockname-anchor);
\draw (\SphereRadius,0,0) coordinate (\cubeblockname-east);
\draw (-\SphereRadius,0,0) coordinate (\cubeblockname-west);
\draw (0,\SphereRadius,0) coordinate (\cubeblockname-north);
\draw (0,-\SphereRadius,0) coordinate (\cubeblockname-south);
%\draw[very thick] (-2*\SphereRadius/4,-2*\SphereRadius/4,0) -- (2*\SphereRadius/4,2*\SphereRadius/4,0);
%\draw [very thick] (c1-east)++(0,\up,0) node [anchor=south west, inner sep = 10, xshift=10,scale=1.2]{$p_{i,j}^{(k)} - p_{(i+\Delta i),(j+\Delta j)}^{(k)}$} -- node {\midarrow} (abs1-west-up);
\shade[ball color=green,opacity=0.30] (0,0,0) circle (\SphereRadius);
},
/block/.search also={/tikz},
/block/.cd,
width/.store in=\cubex,
height/.store in=\cubey,
depth/.store in=\cubez,
scale/.store in=\cubescale,
numFilters/.store in=\cubexlabel,
ylabel/.store in=\cubeylabel,
radius/.store in=\SphereRadius,
blocklabel/.store in=\cubeblocklabel,
blockname/.store in=\cubeblockname,
width=2,
height=13,
depth=15,
scale=.2,
numFilters=,
ylabel=,
radius=0.5,
blocklabel=,
blockname=,
}