Quantifying, Understanding, and Improving Generalization in Deep Learning