title: How do I output confidence level in Resnet 50 classification?
body: <p>I trained Resnet-50 classification network to classify my objects and I use the following code to evaluate the network.</p>
  <pre><code>from tensorflow.keras.models import load_model
  import cv2
  import numpy as np
  import os
  
  class_names = [&quot;x&quot;, &quot;y&quot;, &quot;b&quot;,&quot;g&quot;, &quot;xx&quot;, &quot;yy&quot;, &quot;bb&quot;,&quot;gg&quot;, &quot;xyz&quot;,&quot;xzy&quot;,&quot;yy&quot;]
  
  
  model = load_model('transfer_resnet.h5')
  
  
  model.compile(loss='categorical_crossentropy',
                optimizer='adam',
                metrics=['accuracy'])
  
  imgg = cv2.imread('/path to image/a1.jpg')
  
  
  img = cv2.resize(imgg,(224,224))
  img = np.reshape(img,[1,224,224,3])
  
  
  classes = np.argmax(model.predict(img), axis = -1)
  
  print(classes)
  
  for i in classes:
      names = class_names[i]
  print(names)
  
  
  
  cv2.imshow(&quot;id&quot;,imgg)
  key = cv2.waitKey(0)
  </code></pre>
  <p>The output of the system after processing is only the class of the object without showing any confidence percentage, my question is how do I also show confidence percentage during the test?</p>