AustingDong
commited on
Commit
·
f73c268
1
Parent(s):
b742b00
Update cam.py
Browse files- demo/cam.py +1 -1
demo/cam.py
CHANGED
@@ -336,7 +336,7 @@ class AttentionGuidedCAMLLaVA(AttentionGuidedCAM):
|
|
336 |
def generate_cam(self, inputs, tokenizer, temperature, top_p, class_idx=None, visual_pooling_method="CLS", focus="Visual Encoder"):
|
337 |
|
338 |
# Forward pass
|
339 |
-
outputs_raw = self.model(**inputs)
|
340 |
|
341 |
self.model.zero_grad()
|
342 |
print("outputs_raw", outputs_raw)
|
|
|
336 |
def generate_cam(self, inputs, tokenizer, temperature, top_p, class_idx=None, visual_pooling_method="CLS", focus="Visual Encoder"):
|
337 |
|
338 |
# Forward pass
|
339 |
+
outputs_raw = self.model(**inputs, num_logits_to_keep=1)
|
340 |
|
341 |
self.model.zero_grad()
|
342 |
print("outputs_raw", outputs_raw)
|