Opening Deep Neural Networks With Generative Models