Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I calculate confidence level of my ML Model for each Image of ResNet9

I made the ML Model using the Resnet9 algorithm. In this model, I have 38 classes.
After the prediction, It returns the tuple like this:

enter image description here

It is returning negative values. In the above case, the highest value is -204.0966 means it has the highest chance of being the correct one.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I want to make it in percentage to see what the confidence(Accuracy) of that image. If anyone wants to see the code please tell me.

>Solution :

Try:

import torch
torch.nn.functional.softmax(model_output) * 100
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading