haofanwang / Score-CAM

Official implementation of Score-CAM in PyTorch
MIT License
399 stars 66 forks source link

Score-CAM when the output function is sigmoid #4

Closed tropidophis closed 3 years ago

tropidophis commented 4 years ago

Hello, I am trying to visualize the last convolutional layer of my model, which have a sigmoid function as the last layer. In this case, when the masked array is inputted, should we use softmax function to the output of sigmoid function and take dot with activation map (as this calculation results in all one vector)? Otherwise, should we just use the output of sigmoid function, to multiply with activation map?

Sincerely,

haofanwang commented 4 years ago

Hi, @tropidophis, is your model a binary classification model? I think it should be fine to use the output score from the sigmoid function directly, as the output has been normalized into a fixed range.