Data Assimilation in the Latent Space of a Neural Network