Algorithmic phase retrieval offers an alternative means to recover the phase of optical images without requiring sophisticated measurement setups such as holography. This paper proposes a framework to regularize the highly ill-posed and nonlinear phase retrieval problem through deep generative priors by simply using gradient descent algorithm. We experimentally show effectiveness of the proposed approach for coded diffraction pattern measurements that are relevant in optical imaging setup. We demonstrate that the proposed approach achieves impressive results when compared with conventional hand-engineered priors in terms of number of measurements and robustness against noise. The performance of traditional generative priors based approaches depends upon how well the range of the generator spans the image class. To address this issue, we further modify the proposed algorithm to allow the generative model to explore solutions outside its range, leading to improved performance. Finally, we verify the effectiveness of the proposed approach on a real transmission matrix dataset in an actual application of multiple scattering media imaging.