You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom Conv3D model written in PyTorch and I want to calculate the GradCAM attributions for a 3D volume (representing an mri). The input tensor has input size of (30, 128, 128) and as per below code the attributions have printed shape of (1, 128, 128, 8). I would like your assistance on the mismatch in the number of calculated attribution slices, as I was expecting 30 (instead of 8).
You may run the following code for your reference.
The text was updated successfully, but these errors were encountered:
vggls
changed the title
Missing attribution slices for 3D volume Torch tensor
Mismatch in the number of attribution slices for 3D volume Torch tensor
Apr 18, 2024
I have a custom Conv3D model written in PyTorch and I want to calculate the GradCAM attributions for a 3D volume (representing an mri). The input tensor has input size of (30, 128, 128) and as per below code the attributions have printed shape of (1, 128, 128, 8). I would like your assistance on the mismatch in the number of calculated attribution slices, as I was expecting 30 (instead of 8).
You may run the following code for your reference.
It will print:
input torch.Size([1, 1, 30, 128, 128])
group1 torch.Size([1, 64, 29, 64, 64])
group2 torch.Size([1, 128, 14, 32, 32])
group3 torch.Size([1, 256, 7, 16, 16])
group4 torch.Size([1, 512, 3, 8, 8])
group5 torch.Size([1, 512, 2, 5, 5])
avg layer torch.Size([1, 512])
logits torch.Size([1, 2])
pixel attributions (1, 128, 128, 8)
The text was updated successfully, but these errors were encountered: