Semi-supervised Learning with Deep Generative Models