This is a code for generating 3D gradcam, I hope it will be useful for you
If you want to use this code, first you need to change a few pieces of code in cam.py
from dataset import Dataset
from models.resnet_50 import resnet50_3d
Change to the target_layer
of the model you want to generateChange to the target_layer of the model you want to generate
target_layers = [model.layer1]