Correction to: Nature https://doi.org/10.1038/s41586-020-03152-0Published online 10 March 2021

In Fig. 3a of this Article, the direction of the beamsplitter (transparent rectangle next to the spatial light modulator) was mistakenly drawn at 90° from its actual orientation. We clarify that the physical setup corresponding to the model in Fig. 3a that is shown in Extended Data Fig. 8 is correct. In addition, after equation (5), “where Δp is the SLM pixel pitch” should read “where Δp is the grating pitch (twice the SLM pixel pitch)”. This means that the minimal number of convolution layers required for the CNN to model our 3D scene should be halved from 30 to 15 (see ‘CNN small’ in Fig. 2d). The original Article has been corrected online.