The Variational Method of Moments