Skip to content

Commit

Permalink
fix tolist
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiwen Yuan committed Oct 21, 2024
1 parent d506b54 commit 7c96ae0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/ijcai_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def calculate_hit_rate_on_sparse_target(pred: torch.Tensor,
row_end = crow_indices[i + 1].item()
dst_indices = col_indices[row_start:row_end]
bool_indices = values[row_start:row_end]
true_indices = dst_indices[bool_indices].tolist()
true_indices = dst_indices[bool_indices]

# Check if any of the predicted values match the true indices
pred_indices = pred[i]
Expand Down

0 comments on commit 7c96ae0

Please sign in to comment.