Self-supervised learning for phase retrieval