Skip to content

Commit

Permalink
add checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiwen Yuan committed Oct 21, 2024
1 parent 20815ce commit d0aaa15
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/ijcai_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ def calculate_hit_rate_on_sparse_target(pred: torch.Tensor,
# Get the ground truth indices for this row
row_start = crow_indices[i].item()
row_end = crow_indices[i + 1].item()
assert isinstance(row_start, int)
assert isinstance(row_end, int)
dst_indices = col_indices[row_start:row_end]
bool_indices = values[row_start:row_end]
true_indices = dst_indices[bool_indices]
Expand Down

0 comments on commit d0aaa15

Please sign in to comment.