First of all there are 8 categories. Secondly the output of the prediction has shape (1,8) which is technically a list of a single list(a row of column data) so by passing in model.predict(img_data)
you are going to get back the row. What you need to do is max(model.predict(img_data)[0])
to get the highest value.
To get the class name, that has to do with the method of encoding used on your labels.
Also, if you want, as you stated, your probabilities of each class to be in this form, 90% class1 and 80% class2 ...etc, you should use sigmoid
instead of softmax
as your activation function in the output layer.
* Be the first to Make Comment