liuyugeng / baadd

Code for Backdoor Attacks Against Dataset Distillation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

requiry about the weight of DD

wuyu-1 opened this issue · comments

When I run backdoor on DD, I cannot return the weights of the models.
And when I use the saved dataset to evaluate it again, I cannot get the same results as the training log.

No, you can't directly return any weights because the DD code splits the weights into a list. I think this is because they use a very early version of PyTorch.

I think the parameters are saved in the results.pth. You can load it as the step.

For instance,

steps = torch.load(os.path.join(data_path, 'results.pth'))
steps = [(d.to(state.device), l.to(state.device), lr.to(state.device)) for (d, l, lr) in steps]

And evaluate it by using this.