A Probabilistic Framework for Deep Learning