Hello community,

I ran into the following problem. In the research notebook, I trained a Keras sequential model, then test and save It.

y_org = original_model.predict(X_test)

model_str = json.dumps(serialize_keras_object(original_model))
model_key = 'original_model'
qb.ObjectStore.Save(model_key, model_str)

Following this, I call the model from ObjectStore just like the Documentation says. 

if qb.ObjectStore.ContainsKey(model_key):
    model_str = qb.ObjectStore.Read(model_key)
    config = json.loads(model_str)['config']
    model_saved = Sequential.from_config(config)

To be sure that everything went well, I tested both models in the same notebook and with the same data (X_test). 

original_model.predict(X_test), model_saved.predict(X_test)

But to my surprise, the results were different, additionally, every time that I call the model_saved from the ObjectStore the results change. It returns the same results as my original_model only when I train It again (clearly setting a specific seed), but I want to save the trained model so I do not have to train It on the backtest. Can someone tell me what I am doing wrong?

Thanks in advance.