I used Resnet50 model in binary classification and BCE Loss as the loss function. The labels were 0 and 1.
The accuracy of the model was almost 100% and the class distribution of the test set was almost even.
By applying Grad-CAM++, I was able to get CAM images of the original images.
While there were almost no problem in images predicted as “1”, there frequently were red regions in images predicted as “0” that were likely contributions to class “1” in my eyes.
So right now, I’m quite confused…
Does the Grad-CAM++ with BCE Loss provide the explanation for both classes(why the image is predicted as certain class?) or for class “1”(Red for contribution to class 1 and Blue for contribution to class 0)?
It seems the latter, but as long as i know, Grad-CAM++ utilizes ReLU function to make negative numbers to 0. So I’m much confused.
I expected each CAM image was providing why it was predicted that way. But it seems it is providing the red region for the area contributes to be classified as “1” and the blue region for the area contributes to be classified as “0”
user24933696 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.