Skip to content

Commit

Permalink
minor fix to top_k_overlap
Browse files Browse the repository at this point in the history
  • Loading branch information
gumityolcu committed Jun 4, 2024
1 parent 0322da5 commit b75edd9
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 @@ -29,7 +29,7 @@ def compute(self, *args, **kwargs):
return len(torch.unique(self.all_top_k_examples))

def reset(self, *args, **kwargs):
self.all_top_k_examples = []
self.all_top_k_examples = torch.empty(0, top_k)

def load_state_dict(self, state_dict: dict, *args, **kwargs):
self.all_top_k_examples = state_dict["all_top_k_examples"]
Expand Down

0 comments on commit b75edd9

Please sign in to comment.