write negative log likelihood from memory