AustingDong
commited on
Commit
·
22993a5
1
Parent(s):
492bfa4
Update cam.py
Browse files- demo/cam.py +2 -2
demo/cam.py
CHANGED
@@ -344,7 +344,7 @@ class AttentionGuidedCAMLLaVA(AttentionGuidedCAM):
|
|
344 |
|
345 |
# Forward pass
|
346 |
torch.autograd.set_detect_anomaly(True)
|
347 |
-
for param in self.model.
|
348 |
param.requires_grad = False
|
349 |
|
350 |
for layer in self.target_layers:
|
@@ -477,7 +477,7 @@ class AttentionGuidedCAMChartGemma(AttentionGuidedCAM):
|
|
477 |
|
478 |
# Forward pass
|
479 |
torch.autograd.set_detect_anomaly(True)
|
480 |
-
for param in self.model.
|
481 |
param.requires_grad = False
|
482 |
|
483 |
for layer in self.target_layers:
|
|
|
344 |
|
345 |
# Forward pass
|
346 |
torch.autograd.set_detect_anomaly(True)
|
347 |
+
for param in self.model.parameters():
|
348 |
param.requires_grad = False
|
349 |
|
350 |
for layer in self.target_layers:
|
|
|
477 |
|
478 |
# Forward pass
|
479 |
torch.autograd.set_detect_anomaly(True)
|
480 |
+
for param in self.model.parameters():
|
481 |
param.requires_grad = False
|
482 |
|
483 |
for layer in self.target_layers:
|