Discrete Latent Structure in Neural Networks