  We reconstruct the 3D matter density and peculiar velocity fields in the
local Universe up to a distance of $200\,h^{-1}\,\mathrm{Mpc}$ from the
Two-Micron All-Sky Redshift Survey (2MRS), using a neural network (NN). We
employ a NN with U-net autoencoder architecture and a weighted mean squared
error loss function, trained separately to output either the density or
velocity field for a given input grid of galaxy number counts. The NN is
trained on mocks derived from the Quijote N-body simulations, incorporating
redshift-space distortions (RSD), galaxy bias and selection effects, closely
mimicking the characteristics of 2MRS. The trained NN is benchmarked against a
standard Wiener filter (WF) on a validation set of mocks, before applying it to
2MRS. The NN reconstructions effectively approximate the mean posterior
estimate of the true density and velocity fields conditioned on the
observations. They consistently outperform the WF in terms of reconstruction
accuracy, and effectively capture the nonlinear relation between velocity and
density. The NN-reconstructed bulk flow of the total survey volume exhibits a
significant correlation with the true mock bulk flow, demonstrating that the NN
is sensitive to information on super-survey scales encoded in the RSD. When
applied to 2MRS, the NN successfully recovers the main known clusters, some of
which are partially in the Zone of Avoidance. The reconstructed bulk flows in
spheres of different radii less than $100\,h^{-1}\,\mathrm{Mpc}$ are in good
agreement with a previous 2MRS analysis that required an additional external
bulk flow component inferred from directly observed peculiar velocities. The
NN-reconstructed peculiar velocity of the Local Group closely matches the
observed CMB dipole in amplitude and Galactic latitude, and only deviates by
$18^\circ$ in longitude. The NN-reconstructed fields are publicly available.
