Matching aggregate posteriors in the variational autoencoder