Closed czhao39 closed 3 years ago
Hey @utkuozbulak Should I fix this issue ?
It's not a major issue. Just a matter of a scalar multiplier. I appreciate the heads up but anyone who uses it can simply select 1/mul instead of mul without much trouble.
https://github.com/utkuozbulak/pytorch-cnn-visualizations/blob/16eddfa055a9c618ba548e9fb4529e2ccbc79c35/src/smooth_grad.py#L33
Shouldn't sigma be proportional to the range of the input, not inversely proportional to it? Following the original paper, I think it would make more sense to define sigma as:
sigma = param_sigma_prop * (torch.max(prep_img) - torch.min(prep_img)).item()
where
param_sigma_prop
is the "noise level" in the paper.