I'm trying to load a pre-trained model and pass an image to model.predict()
in keras to predict the probabilities of each class. However, instead of probabilities, I get something like one hot encoding:
[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0.]
What should I do to return the probabilities of each class instead of one hot encoding?
Here is the source code for the pre-trained model:
https://github.com/usmannazir/ChestX/blob/master/4Cnn_keras.ipynb
Please someone help me to solve this issue.