\documentclass[tikz]{standalone}
\usepackage{neuralnetwork}
\newcommand{\xin}[2]{$x_#2$}
\newcommand{\xout}[2]{$\hat x_#2$}
\begin{document}
\begin{neuralnetwork}[height=6]
\tikzstyle{input neuron}=[neuron, fill=orange!70];
\tikzstyle{output neuron}=[neuron, fill=blue!60!black, text=white];
\inputlayer[count=6, bias=false, title=Input Layer, text=\xin]
\hiddenlayer[count=4, bias=false]
\linklayers
\hiddenlayer[count=2, bias=false, title=Latent\\Representation]
\linklayers
\hiddenlayer[count=4, bias=false]
\linklayers
\outputlayer[count=6, title=Output Layer, text=\xout]
\linklayers
\end{neuralnetwork}
\end{document}