Loaded Model Provides only Binary Outputs

I trained a binary classification model that was providing predicted outputs within the range 0 - 1 (Sigmoid activation function outputting predictions). This was working as desired as below:

[[0.8134029 ]

However, after saving the model and trying to re-load and use it on the same data the output has changed to:


Is there a way to return the output as described at the beginning when re-loading a saved model?


Welcome to the Tensorflow Forum!

I tried to save the model using model.save and reloaded using tf.keras.models.load_model and it is working as expected. How are you saving and reloading the model?

Could you please share the standalone code to reproduce the above issue?

Thank you!

Answer was that i was just forgetting to normalise the input data based on my training data, just wanted to make sure I was making a mistake. Thanks for the help!

1 Like