Closed tingwl0122 closed 3 months ago
@TheaperDeng Hi, this is a naive way to incorporate vmap
, which indeed needs to tweak the definition of target_func
to only receive params, data
instead of params, dataloader
. Please let me know whether this makes sense.
Please merge this if you have nothing to add.
Please merge this if you have nothing to add.
I will merge after checking IF's performance on CIFAR-2 (if they perform similarly bad, then I will merge)
Please merge this if you have nothing to add.
I will merge after checking IF's performance on CIFAR-2 (if they perform similarly bad, then I will merge)
Confirmed the performance on Cifar-2, the poor performance is not unique for TracIn.
Description
This PR experiments with the usage of
vmap
on TracIn and also modify the io of TracIn. Other slight modifications are also taken.1. Motivation and Context
To improve the efficiency and clarity of TracIn.
2. Summary of the change
remove
dattri/algorithm/utlis.py
, which is typo in the naming.modify the score computation of TracIn to support vmap usage. This also allows
train_dataloader
andtest_dataloader
input with batch size different from 1.at the same time, the requirement on the input
target_func
of TracIn is modified to supportvmap
.remove
projector_list
as an input to TracIn attributor, projectors will be created inherently if relatedkwargs
are specified.[ ] TODO: update the docstring for the
target_func
input. Please refer totest/dattri/algorithm/test_tracin.py
to see the modification on the io of TracIn.3. What tests have been added/updated for the change?