Blind testing accuracies (reported in percentage) for all-optical (D2NN only), D2NN and perfect imager-based hybrid systems used in this work for MNIST dataset. The 2-stage hybrid system training discussed in the Methods section was not used here. Instead, D2NN and 5 different digital neural networks were jointly-trained at the same time from scratch. All the electronic neural networks used ReLU as the nonlinear activation function, and all the D2NN designs were based on spatially and temporally coherent illumination and linear materials, with 5 diffractive layers. Yellow and blue colors refer to Δ z = 40×λ and Δ z = 4×λ, respectively.