  Upcoming 21cm surveys will map the spatial distribution of cosmic neutral
hydrogen (HI) over very large cosmological volumes. In order to maximize the
scientific return of these surveys, accurate theoretical predictions are
needed. Hydrodynamic simulations currently are the most accurate tool to
provide those predictions in the mildly to non-linear regime. Unfortunately,
their computational cost is very high: tens of millions of CPU hours. We use
convolutional neural networks to find the mapping between the spatial
distribution of matter from N-body simulations and HI from the state-of-the-art
hydrodynamic simulation IllustrisTNG. Our model performs better than the widely
used theoretical model: Halo Occupation Distribution (HOD) for all statistical
properties up to the non-linear scales $k\lesssim1$ h/Mpc. Our method allows
the generation of 21cm mocks over very big cosmological volumes with similar
properties as hydrodynamic simulations.
