\documentclass[border=8pt, multi, tikz]{standalone}
%\usepackage{blocks}
\usepackage{import}
\usetikzlibrary{positioning}
\usetikzlibrary{quotes,arrows.meta}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows, decorations.markings}
\usetikzlibrary{calc}

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

\usepackage{tikz/Ball}
\usepackage{tikz/Box}
\usepackage{tikz/RightBandedBox}



\def\InputColor{rgb:blue,2;black,0.3}
\def\ConvColor{rgb:yellow,5;red,2.5;white,5}
\def\ConvReluColor{rgb:yellow,5;red,5;white,5}
\def\PoolColor{rgb:red,1;black,0.3}
\def\UnpoolColor{rgb:blue,2;green,1;black,0.3}
\def\ConcatColor{rgb:blue,5;red,2.5;white,5}
\def\FcReluColor{rgb:blue,5;red,5;white,4}
\def\OutColor{rgb:magenta,5;black,7}


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

\begin{document}
\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]
\tikzstyle{vecArrow} = [thick, decoration={markings,mark=at position
   1 with {\arrow[semithick]{open triangle 60}}},
   double distance=1.4pt, shorten >= 5.5pt,
   preaction = {decorate},
   postaction = {draw,line width=1.4pt, white,shorten >= 4.5pt}]
\tikzstyle{innerWhite} = [semithick, white,line width=1.4pt, shorten >= 4.5pt]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Input
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% conv1_1,conv1_2
\pic[shift={(0,0,0)}] at (0,0,0) {Box={name=input,%
        xlabel={{"1","dummy"}},fill=\InputColor,height=40,width=1,depth=40}};
\pic[shift={(-0.8,2.5,0)}] at (input-north) {Box={name=te,%
        xlabel={{"\Huge TE","dummy"}},fill=\InputColor,height=1,width=1,depth=1}};
\pic[shift={(0.8,2.5,0)}] at (input-north) {Box={name=tr,%
        xlabel={{"\Huge TR","dummy"}},fill=\InputColor,height=1,width=1,depth=1}};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Draw Encoder
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% conv1_1,conv1_2
\pic[shift={(2,0,0)}] at (input-east) {RightBandedBox={name=cr1,%
        xlabel={{"64","64"}},caption=I,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=40,width={2,2},depth=40}};
%pool1
\pic[shift={(2,-6,0)}] at (cr1-east) {Box={name=p1,%
        fill=\PoolColor,opacity=0.6,height=32,width=1,depth=32}};
%%%%%%%%%%
% conv2_1,conv2_2
\pic[shift={(0,0,0)}] at (p1-east) {RightBandedBox={name=cr2,%
        xlabel={{"128","128"}},caption=I/2,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=32,width={3.5,3.5},depth=32}};
%pool2
\pic[shift={(2,-5.5,0)}] at (cr2-east) {Box={name=p2,%
        fill=\PoolColor,opacity=0.6,height=25,width=1,depth=25}};
%%%%%%%%%%
% conv3_1,conv3_2
\pic[shift={(0,0,0)}] at (p2-east) {RightBandedBox={name=cr3,%
        xlabel={{"256","256"}},caption=I/4,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=25,width={4.5,4.5},depth=25}};
%pool3
\pic[shift={(2,-4,0)}] at (cr3-east) {Box={name=p3,%
        fill=\PoolColor,opacity=0.6,height=16,width=1,depth=16}};
%%%%%%%%%%
% conv4_1,conv4_2,conv4_3
\pic[shift={(0,0,0)}] at (p3-east) {RightBandedBox={name=cr4,%
        xlabel={{"512","512"}},caption=I/8,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=16,width={6,6},depth=16}};
%pool4
\pic[shift={(2,-3,0)}] at (cr4-east) {Box={name=p4,%
        fill=\PoolColor,opacity=0.6,height=8,width=1,depth=8}};
%%%%%%%%%%
% conv5_1,conv5_2,conv5_3
\pic[shift={(0,0,0)}] at (p4-east) {RightBandedBox={name=cr5,%
        xlabel={{"1024","1024"}},caption=I/16,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=12,width={8,8},depth=12}};
%pool4
\pic[shift={(2,-3,0)}] at (cr5-east) {Box={name=p5,%
        fill=\PoolColor,opacity=0.6,height=6,width=1,depth=6}};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Bottleneck
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% conv5_1,conv5_2,conv5_3
\pic[shift={(0,0,0)}] at (p5-east) {RightBandedBox={name=cr6,caption=I/32,%
        xlabel={{"2048","2048"}},fill=\ConvColor,bandfill=\ConvReluColor,%
        height=8,width={6,6},depth=8}};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Draw Decoder 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% unpool5, 
\pic[shift={(0,0,0)}] at (cr6-east) {Box={name=up5,%
        fill=\UnpoolColor,opacity=0.6,height=16,width=1,depth=16}};
\pic[shift={(0,0,0)}] at (up5-east) {RightBandedBox={name=ucr5,%
        xlabel={{"512","dummy"}},caption=I/8,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=16,width=6,depth=16}};
\pic[shift={(0,3,0)}] at (ucr5-anchor) {Ball={name=cat5,fill=\ConcatColor,radius=2.5,logo=$||$}};    
\pic[shift={(2,0,0)}] at (cat5-east) {RightBandedBox={name=ucr5a,%
        xlabel={{"512","512"}},caption=I/8,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=16,width={6,6},depth=16}};
%%%%%%%%%%
%% unpool4, 
\pic[shift={(0,0,0)}] at (ucr5a-east) {Box={name=up4,%
        fill=\UnpoolColor,opacity=0.6,height=16,width=1,depth=16}};
\pic[shift={(0,0,0)}] at (up4-east) {RightBandedBox={name=ucr4,%
        xlabel={{"512","dummy"}},caption=I/8,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=16,width=6,depth=16}};
\pic[shift={(0,3,0)}] at (ucr4-anchor) {Ball={name=cat4,fill=\ConcatColor,radius=2.5,logo=$||$}};    
\pic[shift={(2,0,0)}] at (cat4-east) {RightBandedBox={name=ucr4a,%
        xlabel={{"512","512"}},caption=I/8,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=16,width={6,6},depth=16}};
%%%%%%%%%%
%% unpool3, 
\pic[shift={(0,0,0)}] at (ucr4a-east) {Box={name=up3,%
        fill=\UnpoolColor,opacity=0.6,height=25,width=1,depth=25}};
\pic[shift={(0,0,0)}] at (up3-east) {RightBandedBox={name=ucr3,%
        xlabel={{"256","dummy"}},caption=I/4,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=25,width=4.5,depth=25}};
\pic[shift={(0,4,0)}] at (ucr3-anchor) {Ball={name=cat3,fill=\ConcatColor,radius=2.5,logo=$||$}};
\pic[shift={(2,0,0)}] at (cat3-east) {RightBandedBox={name=ucr3a,%
        xlabel={{"256","256"}},caption=I/4,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=25,width={4.5,4.5},depth=25}};
%%%%%%%%%%
%% unpool2, 
\pic[shift={(0,0,0)}] at (ucr3a-east) {Box={name=up2,%
        fill=\UnpoolColor,opacity=0.6,height=32,width=1,depth=32}};
\pic[shift={(0,0,0)}] at (up2-east) {RightBandedBox={name=ucr2,%
        xlabel={{"128","dummy"}},caption=I/2,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=32,width=3.5,depth=32}};
\pic[shift={(0,5.5,0)}] at (ucr2-anchor) {Ball={name=cat2,fill=\ConcatColor,radius=2.5,logo=$||$}};
\pic[shift={(2,0,0)}] at (cat2-east) {RightBandedBox={name=ucr2a,%
        xlabel={{"128","128"}},caption=I/2,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=32,width={3.5,3.5},depth=32}};
%%%%%%%%%%
%% unpool1, 
\pic[shift={(0,0,0)}] at (ucr2a-east) {Box={name=up1,%
        fill=\UnpoolColor,opacity=0.6,height=40,width=1,depth=40}};
\pic[shift={(0,0,0)}] at (up1-east) {RightBandedBox={name=ucr1,%
        xlabel={{"64","dummy"}},caption=I,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=40,width=2.5,depth=40}};
\pic[shift={(0,6,0)}] at (ucr1-anchor) {Ball={name=cat1,fill=\ConcatColor,radius=2.5,logo=$||$}};
\pic[shift={(2,0,0)}] at (cat1-east) {RightBandedBox={name=ucr1a,%
        xlabel={{"64","64"}},caption=I,fill=\ConvColor,bandfill=\ConvReluColor,%
        height=40,width={2.5,2.5},depth=40}};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Classifier 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pic[shift={(3,0,0)}] at (ucr1a-east) {Box={name=feature1,caption=ReLU,%
        fill=\ConvColor,height=40,width=1,depth=40}};
\pic[shift={(0,0,0)}] at (feature1-east) {Box={name=feature2,%
        xlabel={{"3","dummy"}},fill=\ConvColor,height=40,width=1,depth=40}};
\pic[shift={(0,0,0)}] at (feature2-east) {Box={name=feature3,%
        fill=\ConvColor,height=40,width=1,depth=40}};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Signal Equation 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pic[shift={(4,0,0)}] at (feature3-east) {Box={name=PD,%
        fill=\ConvColor,height=40,width=1,depth=40}};
\pic[shift={(0.5,0,0)}] at (PD-east) {Box={name=T1,%
        fill=\ConvColor,height=40,width=1,depth=40}};
\pic[shift={(0.5,0,0)}] at (T1-east) {Box={name=T2,%
        fill=\ConvColor,height=40,width=1,depth=40}};
        
        
\node[shift={(-0.5,4,0)}] at (T1-north) {\Huge $PD \times \left( 1 - e^{-TR / T1} \right) \times e^{- TE / T2} = $};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Signal Equation 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pic[shift={(7.5,8,0)}] at (T2-east) {Box={name=out,%
        fill=\OutColor,height=40,width=1,depth=40}};

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Draw connections
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\path (cr1-east) -- (p1-west|-cr1-west) coordinate[pos=0.5] (crp1-mid) ;
\path (cr2-east) -- (p2-west|-cr2-west) coordinate[pos=0.5] (crp2-mid) ;
\path (cr3-east) -- (p3-west|-cr3-west) coordinate[pos=0.5] (crp3-mid) ;
\path (cr4-east) -- (p4-west|-cr4-west) coordinate[pos=0.5] (crp4-mid) ;
\path (cr5-east) -- (p5-west|-cr5-west) coordinate[pos=0.5] (crp5-mid) ;

\draw[connection](input-east)--node{\midarrow}(cr1-west);
\draw[connection](cr1-east)--node{\midarrow}(crp1-mid)--node{\midarrow}(p1-west-|crp1-mid)--node{\midarrow}(p1-west);
\draw[connection](cr2-east)--node{\midarrow}(crp2-mid)--node{\midarrow}(p2-west-|crp2-mid)--node{\midarrow}(p2-west);
\draw[connection](cr3-east)--node{\midarrow}(crp3-mid)--node{\midarrow}(p3-west-|crp3-mid)--node{\midarrow}(p3-west);
\draw[connection](cr4-east)--node{\midarrow}(crp4-mid)--node{\midarrow}(p4-west-|crp4-mid)--node{\midarrow}(p4-west);
\draw[connection](cr5-east)--node{\midarrow}(crp5-mid)--node{\midarrow}(p5-west-|crp5-mid)--node{\midarrow}(p5-west);

%\draw [connection]  (cr5-east)   -- node {\midarrow} (up4-west);
%\draw [connection]  (ucr4a-east) -- node {\midarrow} (up3-west);
%\draw [connection]  (ucr3a-east) -- node {\midarrow} (up2-west);
%\draw [connection]  (ucr2a-east) -- node {\midarrow} (up1-west);
%\draw [connection]  (ucr1a-east) -- node {\midarrow} (out-west);
%\draw [connection]  (out-east)   -- node {\midarrow} ++(2,0,0);

\draw [copyconnection]  (cr5-east)  -- node {\copymidarrow} (cat5-west);
\draw [copyconnection]  (cr4-east)  -- node {\copymidarrow} (cat4-west);
\draw [copyconnection]  (cr3-east)  -- node {\copymidarrow} (cat3-west);
\draw [copyconnection]  (cr2-east)  -- node {\copymidarrow} (cat2-west);
\draw [copyconnection]  (cr1-east)  -- node {\copymidarrow} (cat1-west);

\draw [copyconnection]  (cat5-east)  -- node {\copymidarrow} (ucr5a-west);
\draw [copyconnection]  (cat4-east)  -- node {\copymidarrow} (ucr4a-west);
\draw [copyconnection]  (cat3-east)  -- node {\copymidarrow} (ucr3a-west);
\draw [copyconnection]  (cat2-east)  -- node {\copymidarrow} (ucr2a-west);
\draw [copyconnection]  (cat1-east)  -- node {\copymidarrow} (ucr1a-west);

\draw [copyconnection]  (ucr5-north)  -- node {\copymidarrow} (cat5-south);
\draw [copyconnection]  (ucr4-north)  -- node {\copymidarrow} (cat4-south);
\draw [copyconnection]  (ucr3-north)  -- node {\copymidarrow} (cat3-south);
\draw [copyconnection]  (ucr2-north)  -- node {\copymidarrow} (cat2-south);
\draw [copyconnection]  (ucr1-north)  -- node {\copymidarrow} (cat1-south);

\draw[copyconnection](ucr1a-east)--node{\midarrow}(feature1-west);

\draw[vecArrow](feature1-east)--(PD-west);
\draw[innerWhite](feature1-east)--(PD-west);

\draw[->](PD-north)--($(PD-north) + (0, 2.5)$)--($(PD-north) + (-5.5, 2.5)$)--($(PD-north) + (-5.5, 3.3)$); 
\draw[->](T1-north)--($(T1-north) + (0, 3.8)$); 
% \draw[->]($(PD) + (0, 0)$)--($(PD) + (1, 0)$);
\draw[->](T2-north)--($(T2-north) + (0, 2.5)$)--($(T2-north) + (3.9, 2.5)$)--($(T2-north) + (3.9, 3.8)$); 
\draw[->](tr-north)--($(tr-north) + (0, 2.5)$)--($(tr-north) + (56.2, 2.5)$)--($(tr-north) + (56.2, 2.2)$); 
\draw[->](te-north)--($(te-north) + (0, 3)$)--($(te-north) + (62.4, 3)$)--($(te-north) + (62.4, 2.2)$); 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{tikzpicture}
\end{document}
