  The accurate reconstruction of Cosmic Microwave Background (CMB) maps and the
measurement of its power spectrum are crucial for studying the early universe.
In this paper, we implement a convolutional neural network to apply the Wiener
Filter to CMB temperature maps, and use it intensively to compute an optimal
quadratic estimation of the power spectrum. Our neural network has a UNet
architecture as that implemented in WienerNet, but with novel aspects such as
being written in python 3 and TensorFlow 2. It also includes an extra channel
for the noise variance map, to account for inhomogeneous noise, and a channel
for the mask. The network is very efficient, overcoming the bottleneck that is
typically found in standard methods to compute the Wiener Filter, such as those
that apply the conjugate gradient. It scales efficiently with the size of the
map, making it a useful tool to include in CMB data analysis. The accuracy of
the Wiener Filter reconstruction is satisfactory, as compared with the standard
method. We heavily use this approach to efficiently estimate the power
spectrum, by performing a simulation-based analysis of the optimal quadratic
estimator. We further evaluate the quality of the reconstructed maps in terms
of the power spectrum and find that we can properly recover the statistical
properties of the signal. We find that the proposed architecture can account
for inhomogeneous noise efficiently. Furthermore, increasing the complexity of
the variance map presents a more significant challenge for the convergence of
the network than the noise level does.
