Joint Inference for Neural Network Depth and Dropout Regularization