Generative Imaging and Image Processing via Generative Encoder