Deep Generative Models with Learnable Knowledge Constraints