  Measuring temperature fluctuations in the 21 cm signal from the Epoch of
Reionization and the Cosmic Dawn is one of the most promising ways to study the
Universe at high redshifts. Unfortunately, the 21 cm signal is affected by both
cosmology and astrophysics processes in a non-trivial manner. We run a suite of
1,000 numerical simulations with different values of the main astrophysical
parameters. From these simulations we produce tens of thousands of 21 cm maps
at redshifts $10\leq z\leq 20$. We train a convolutional neural network to
remove the effects of astrophysics from the 21 cm maps, and output maps of the
underlying matter field. We show that our model is able to generate 2D matter
fields that not only resemble the true ones visually, but whose statistical
properties agree with the true ones within a few percent down to pretty small
scales. We demonstrate that our neural network retains astrophysical
information, that can be used to constrain the value of the astrophysical
parameters. Finally, we use saliency maps to try to understand which features
of the 21 cm maps is the network using in order to determine the value of the
astrophysical parameters.
