The Geometry of Deep Generative Image Models and its Applications