Skip to content
Snippets Groups Projects
Commit b541d62a authored by Rishi Sharma's avatar Rishi Sharma
Browse files

Bugfix ChangeAccumulator

parent d05d8934
No related branches found
No related tags found
No related merge requests found
......@@ -132,7 +132,7 @@ class ChangeAccumulator(Training):
Saves the change and the gradient values for every iteration
"""
tensors_to_cat = [v.data.flatten() for _, v in self.model.items()]
tensors_to_cat = [v.data.flatten() for _, v in self.model.state_dict().items()]
params = torch.abs(torch.cat(tensors_to_cat, dim=0))
self.save_vector(params, self.model_val_path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment