I have trained a model in Keras, and saved it in different ways like;
model.save("filename")
or
model.to_json()
model.save_weights("filename")
But when I load the trained model in another program to make predictions, I get very different results from the test results.
Why does that happens and how can I handle that?
You can try saving the model in .h5 format
save it like:
Then for loading it into application efficiently, make it a global like following so that it doesn't load again and again: