\begin{tikzpicture}[scale=0.4,rotate=90]
	\vspace*{0.1\textwidth}
	\centering    
	\onslide<1->{
		\renewcommand{\forefillColor}{black!50!white}
		\renewcommand{\borderColor}{white}
		\renewcommand{\toprsidefillcolor}{red}

		%% input layer
		\handmadecube{0}{4.5}{2.5}{-1}{0}
		\renewcommand{\toprsidefillcolor}{green}                  
		\handmadecube{0}{4.5}{2.5}{-1+0.2}{0}
		\renewcommand{\toprsidefillcolor}{blue!60!white}          
		\handmadecube{0}{4.5}{2.5}{-1+0.4}{0}
		\node[scale=0.85] at (1-0.6*2.6-0.1,0-4.8-0.5){\tiny{Input}};
		%     \node [scale=0.7, rotate=45] at (1-0.6*2.6+0.6,0.2) {\tiny{224}};
		%     \node [scale=0.7, rotate=90] at (1-0.6*2.6+0.2,-2) {\tiny{224}};


		% Convolution Layer
		\renewcommand{\forefillColor}{red!50!white}
		\renewcommand{\borderColor}{white}
		\renewcommand{\toprsidefillcolor}{red!50!white!50}

		\pgfmathsetmacro{\seedx}{1}
		\pgfmathsetmacro{\seedy}{0}

		\foreach \xct/\yct in {1,...,2}
		{
			\pgfmathsetmacro{\xcti}{\seedx+\xct*0.1}
			\pgfmathsetmacro{\ycti}{\seedy}
			\handmadecube{0.5}{4.5}{2.5}{\xcti}{\ycti}
		}
		\node[scale=0.85] at (1+0.5,0-4.8){\tiny{Conv}};
		%     \node [scale=0.7, rotate=45] at (1-0.6*2.6+3.2,0.2) {\tiny{224}};
		%     \node [scale=0.7, rotate=90] at (1-0.6*2.6+0.2+2.6,-2) {\tiny{224}};
		%     \node[scale=0.7] at (1+0.725,0-4.2){\tiny{64}};
		
		
		
		% Pooling Layer
		\renewcommand{\forefillColor}{blue!50!white}
		\renewcommand{\borderColor}{white}
		\renewcommand{\toprsidefillcolor}{blue!50!white!50}
		
		\pgfmathsetmacro{\seedx}{2.5}
		\pgfmathsetmacro{\seedy}{0}

		\foreach \xct/\yct in {1}
		{
			%       \pgfmathsetmacro{\xcti}{\seedx+\xct*0.1}
			%       \pgfmathsetmacro{\ycti}{\seedy}
			
			\pgfmathsetmacro{\xcti}{\seedx+\xct*0.1}
			\pgfmathsetmacro{\ycti}{\seedy}
			\handmadecube{0.5}{3.8}{1.8}{\xcti}{\ycti}
		}
		\node[scale=0.85] at (0.5+2.8,0-4.2){\tiny{Max-pool}};
		%     \node [scale=0.6, rotate=45] at (1+3.7,0.2) {\tiny{112}};
		%     \node [scale=0.6, rotate=90] at (1+3.3,-2+0.5) {\tiny{112}};
		%     \node[scale=0.7] at (1+2.85,0-3.5){\tiny{64}};
		
		\foreach \xct in {1,2,3}
		{
			\filldraw[fill=gray!60](3+\xct,-1) circle(2pt) ;
		}

		%     \def\yShift{7};
		%     \def\xShift{0};           
		%     \draw (\yShift+0,\xShift+0) rectangle(\yShift+1,\xShift+5);
		
	}
	
	%-----------------------------Slide 1 End ------------------------------------------
	
	
	\onslide<2->{
		\parallelogram{0}{5}{2}{7}{1}
		\node(label) at (7.5,-5) {\tiny{ROI}};  
	}
	
	\onslide<3->{

		%Grid inside Parallelogram          
		\parallelogramWithGrid{0}{5}{2}{7}{1} 

	}
	
	
	\onslide<6->{
		\draw (8.2,-2.2)--(10,-5.5);
		\draw (8.2,2.8)--(10,5.5);
		\draw (10,-5.5) rectangle (11,5.5);
	}     
	
	\onslide<6-7>{
		\node (V_T) at (9.2,-0.5) {
			\begin{footnotesize}
				$W$
			\end{footnotesize}
		};      
	}

	\if 0
	\onslide<8->{
		\draw (13,-5.5) rectangle (14,5.5);
	}
	
	\onslide<8->{
		\node (V_T) at (9.2,-0.5) {
			\begin{footnotesize}
				$V^T$
			\end{footnotesize}
		};      
	}
	
	
	\onslide<8->{
		\node (V_T) at (12.2,-0.5) {
			\begin{footnotesize}
				$U \Sigma$
			\end{footnotesize}
		};
		%\draw (16,-5.5) rectangle (17,5.5);
	}
	
	
		\onslide<8->{
			\node (V_T) at (15.2,-0.5) {
				\begin{footnotesize}
					$U \Sigma$
				\end{footnotesize}
			};      
		}
	\fi           

	%     \filldraw[fill=red](10,3)circle(3pt);

\end{tikzpicture}
