pytorch-grad-cam
pytorch-grad-cam copied to clipboard
GuidedBackpropReLUModel cannot use batches
GuidedBackpropReLUModel always uses a batch size of 1, this is hard-coded into the implementation eg here:
https://github.com/jacobgil/pytorch-grad-cam/blob/2183a9cbc1bd5fc1d8e134b4f3318c3b6db5671f/pytorch_grad_cam/guided_backprop.py#L89
Will the Guided Backprop be broken by batching? I could see how batching might ruin guided backprop, but I'm not sure if that's true or if this one-sample-per-batch implementation is just for simplicity. If batch size > 1 is not possible, please feel free to close this issue. If it is possible, consider this a feature request. Thanks!