Lewis, O. Structured learning and inference with neural networks and generative models. (2018).