Open MoH-assan opened 1 week ago
I have also tested this out https://github.com/jacobgil/pytorch-grad-cam/issues/67#issuecomment-816574880 I am not sure how it should work in my case, If I understand correctly, In X3D architecture, the model performs convolution in the temporal dimension, so a forward pass with one frame would fail because the input size will be smaller than the kernel in the temporal direction.
Thanks,
It might be missing an equal sign in this line https://github.com/jacobgil/pytorch-grad-cam/blob/1ff3f58818baa2889f3f51d0b9759783b4333ba0/pytorch_grad_cam/utils/image.py#L168
After changing it to
if len(img.shape) >= 3:
It seems to be working.
Hi, Thanks for the Repo
I am trying to use GradCAM on the X3D model from the tutorial below. https://pytorch.org/hub/facebookresearch_pytorchvideo_x3d/#define-input-transform
However, I am getting the error below. Which I guess has to do with upsampling the GCAM to the original input size.
I am not sure if the upsampling should also get updated after this merge https://github.com/jacobgil/pytorch-grad-cam/pull/466?
Thanks,