DeepMass infers dark matter maps from weak gravitational lensing measurements and uses deep learning to reconstruct cosmological maps. The code can also be incorporated into a Moment Network to enable high-dimensional likelihood-free inference.