Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
gumityolcu committed Jun 3, 2024
1 parent 33ed998 commit 8ac2df0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/metrics/unnamed/top_k_overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def update(
**kwargs,
):
top_k_indices = torch.topk(explanations, self.top_k).indices
self.all_top_k_examples += top_k_indices
self.all_top_k_examples.append(top_k_indices)

def compute(self, *args, **kwargs):
return len(set(self.all_top_k_examples))
Expand Down

0 comments on commit 8ac2df0

Please sign in to comment.