Compositional Methods for Learning and Inference in Deep Probabilistic Programs