Autonomous Learning of Generative Models with Chemical Reaction Network Ensembles