title: How to return prediction probabilities instead of one hot encoding from keras model.predict()?
body: <p>I'm trying to load a pre-trained model and pass an image to <code>model.predict()</code> in keras to predict the probabilities of each class. However, instead of probabilities, I get something like one hot encoding:</p>
  
  <p><code>[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0.]</code></p>
  
  <p><a href="https://i.stack.imgur.com/QOAOM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QOAOM.png" alt="Code Snippet"></a></p>
  
  <p>What should I do to return the probabilities of each class instead of one hot encoding?</p>
  
  <p>Here is the source code for the pre-trained model:</p>
  
  <p><a href="https://github.com/usmannazir/ChestX/blob/master/4Cnn_keras.ipynb" rel="nofollow noreferrer">https://github.com/usmannazir/ChestX/blob/master/4Cnn_keras.ipynb</a></p>
  
  <p>Please someone help me to solve this issue.</p>