Fig. 2: Phase retrieval method.

a A block diagram representation of the CNN during the prediction phase. During the training step, the support penalty is replaced with the ground truth loss for the amplitude and phase. In the encoder branch, the size of the array is halved at every step using Max Pool operations and the depth of the feature map is doubled using a convolution layer. The initial layer expands the number of channels by 64. In the decoder branches, the size is doubled using an upsampling method and the depth is halved at each step using a deconvolution layer. The size of the output array is made to be half the size of the input diffraction pattern. We used a Leaky RELU activation function for all the layers except for the last layer, where a RELU function is used instead. b The loss diagram during the training and validation of the model. c The loss during the prediction of the final reconstruction for each laser polarisation.