Save and load model optimizer state : <p>I have a set of fairly complicated models that I am training and I am looking for a way to save and load the model optimizer states. The "trainer models" consist of different combinations of several other "weight models", of which some have shared weights, some have frozen weights depending on the trainer, etc. It is a bit too complicated of an example to share, but in short, I am not able to use <code>model.save('model_file.h5')</code> and <code>keras.models.load_model('model_file.h5')</code> when stopping and starting my training. </p>

<p>Using <code>model.load_weights('weight_file.h5')</code> works fine for testing my model if the training has finished, but if I attempt to continue training the model using this method, the loss does not come even close to returning to its last location. I have read that this is because the optimizer state is not saved using this method which makes sense. However, I need a method for saving and loading the states of the optimizers of my trainer models. It seems as though keras once had a <code>model.optimizer.get_sate()</code> and <code>model.optimizer.set_sate()</code> that would accomplish what I am after, but that does not seem to be the case anymore (at least for the Adam optimizer). Are there any other solutions with the current Keras?</p>
