An efficient Deep Neural Network implementation