I am using this script in pytorch available in your repository.
Currently, this line is
cam = weight_softmax[class_idx].dot(feature_conv.reshape((nc, h*w)))
But I think it should be,
cam = weight_softmax[idx].dot(feature_conv.reshape((nc, h*w)))
class_idx should be replaced by idx, becuase class_idx is a list, idx is a integer.
I am using this script in pytorch available in your repository. Currently, this line is
cam = weight_softmax[class_idx].dot(feature_conv.reshape((nc, h*w)))
But I think it should be,cam = weight_softmax[idx].dot(feature_conv.reshape((nc, h*w)))
class_idx should be replaced by idx, becuase class_idx is a list, idx is a integer.