  The inference of cosmological quantities requires accurate and large
hydrodynamical cosmological simulations. Unfortunately, their computational
time can take millions of CPU hours for a modest coverage in cosmological
scales ($\approx (100 {h^{-1}}\,\text{Mpc})^3)$). The possibility to generate
large quantities of mock Lyman-$\alpha$ observations opens up the possibility
of much better control on covariance matrices estimate for cosmological
parameters inference, and on the impact of systematics due to baryonic effects.
We present a machine learning approach to emulate the hydrodynamical simulation
of intergalactic medium physics for the Lyman-$\alpha$ forest called LyAl-Net.
The main goal of this work is to provide highly efficient and cheap simulations
retaining interpretation abilities about the gas field level, and as a tool for
other cosmological exploration. We use a neural network based on the U-net
architecture, a variant of convolutional neural networks, to predict the
neutral hydrogen physical properties, density, and temperature. We train the
LyAl-Net model with the Horizon-noAGN simulation, though using only 9% of the
volume. We also explore the resilience of the model through tests of a transfer
learning framework using cosmological simulations containing different baryonic
feedback. We test our results by analysing one and two-point statistics of
emulated fields in different scenarios, as well as their stochastic properties.
The ensemble average of the emulated Lyman-$\alpha$ forest absorption as a
function of redshift lies within 2.5% of one derived from the full
hydrodynamical simulation. The computation of individual fields from the dark
matter density agrees well with regular physical regimes of cosmological
fields. The results tested on IllustrisTNG100 showed a drastic improvement in
the Lyman-$\alpha$ forest flux without arbitrary rescaling.
