Adaptive Deep Neural Network Architecture