PyTorch implementation of diffractive optical neural networks under arbitrary spatial coherence.
Supplementary code from our paper.
Run the following to train a model on the MNIST dataset:
python train.py --coherence-degree=1 --wavelength=700e-9 --pixel-size=10e-6