Efficient Processing of Deep Neural Network: from Algorithms to Hardware Architectures