Generative priors for inverse problems: regularized training and recovery analysis.