baadd
baadd copied to clipboard
requiry about the weight of DD
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.