File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ with GradCAM(model=model, target_layers=target_layers) as cam:
126
126
[ cam.py] ( https://github.com/jacobgil/pytorch-grad-cam/blob/master/cam.py ) has a more detailed usage example.
127
127
128
128
----------
129
- # Choosing the Target Layer
129
+ # Choosing the layer(s) to extract activations from
130
130
You need to choose the target layer to compute the CAM for.
131
131
Some common choices are:
132
132
- FasterRCNN: model.backbone
@@ -136,8 +136,10 @@ Some common choices are:
136
136
- ViT: model.blocks[ -1] .norm1
137
137
- SwinT: model.layers[ -1] .blocks[ -1] .norm1
138
138
139
+
139
140
If you pass a list with several layers, the CAM will be averaged accross them.
140
141
This can be useful if you're not sure what layer will perform best.
142
+
141
143
----------
142
144
143
145
# Adapting for new architectures and tasks
You can’t perform that action at this time.
0 commit comments