  We present a novel application of partial convolutional neural networks
(PCNN) that can inpaint masked images of the cosmic microwave background. The
network can reconstruct both the maps and the power spectra to a few percent
for circular and irregularly shaped masks covering up to ~10% of the image
area. By performing a Kolmogorov-Smirnov test we show that the reconstructed
maps and power spectra are indistinguishable from the input maps and power
spectra at the 99.9% level. Moreover, we show that PCNNs can inpaint maps with
regular and irregular masks to the same accuracy. This should be particularly
beneficial to inpaint irregular masks for the CMB that come from astrophysical
sources such as galactic foregrounds. The proof of concept application shown in
this paper shows that PCNNs can be an important tool in data analysis pipelines
in cosmology.
