Not yet. I did some tests and I believe I understand from where the problem is coming: in the call function I also use three global variables and I believe that the problem comes from the way how the keras model use these variables when it is loaded. To explain: in the Call function, the model parameters are used together with global variables in a formula, in order to compute some results.
The learnt model parameters are almost the same if I train the model after I build it or after I load it. But then, if I complete ‘by hand’ the remaining computations, the results in both scenarios are OK (almost the same - as expected). The only difference is that the loaded model reports wrong (much different than expected) results, although global variables as well as learnt parameters are the same in both scenarios.
So, applying the same computation on the same inputs should result in the same result, but it is not.
The results using same parameters and variables in these scenarios, are different, like this:
for item 123 : scenario is - load + train
po: 2.47, el: -14.24
for item 123 : scenario is - build + train
po: 1.92, el: -3.67