Convergence plots and confusion matrices for all-optical D2NN-based classification of handwritten digits (MNIST dataset). (a) Convergence curve and confusion matrix for a phase-only, fully-connected D2NN (ΔZ=40λ) design. (b) Convergence curve and confusion matrix for a phase-only, partially-connected D2NN (ΔZ=4λ) design. (c) and (d) are counterparts of (a) and (b), respectively, for complex-modulation D2NN designs, where both the amplitude and phase of each neuron are trainable parameters.