From b541d62a38643a55d27ec44062bce2bd8ec7a7d9 Mon Sep 17 00:00:00 2001 From: Rishi Sharma <rishi.sharma@epfl.ch> Date: Thu, 10 Feb 2022 12:46:15 +0100 Subject: [PATCH] Bugfix ChangeAccumulator --- src/decentralizepy/training/ChangeAccumulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decentralizepy/training/ChangeAccumulator.py b/src/decentralizepy/training/ChangeAccumulator.py index 2e10572..f485c8b 100644 --- a/src/decentralizepy/training/ChangeAccumulator.py +++ b/src/decentralizepy/training/ChangeAccumulator.py @@ -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) -- GitLab