  Practical density functional theory (DFT) owes its success to the
groundbreaking work of Kohn and Sham that introduced the exact calculation of
the non-interacting kinetic energy of the electrons using an auxiliary
mean-field system. However, the full power of DFT will not be unleashed until
the exact relationship between the electron density and the non-interacting
kinetic energy is found. Various attempts have been made to approximate this
functional, similar to the exchange--correlation functional, with much less
success due to the larger contribution of kinetic energy and its more non-local
nature. In this work we propose a new and efficient regularization method to
train density functionals based on deep neural networks, with particular
interest in the kinetic-energy functional. The method is tested on
(effectively) one-dimensional systems, including the hydrogen chain,
non-interacting electrons, and atoms of the first two periods, with excellent
results. For the atomic systems, the generalizability of the regularization
method is demonstrated by training also an exchange--correlation functional,
and the contrasting nature of the two functionals is discussed from a
machine-learning perspective.
