TRAIS-Lab / dattri

`dattri` is a PyTorch library for developing, benchmarking, and deploying efficient data attribution algorithms.
https://trais-lab.github.io/dattri/
MIT License
27 stars 8 forks source link

[dattri.algorithm] Fix misalignment in KNN shapley #126

Closed sx-liu closed 1 month ago

sx-liu commented 1 month ago

Description

In the previous version of KNNShalpeyAttributor.attribute, the test labels are misaligned when there are multiple batches in the test loader. This PR fixes this bug.