From 7ccb7f4a21b6cbf8e43370915bd309c7afc3a062 Mon Sep 17 00:00:00 2001 From: sicer <mansicer@qq.com> Date: Sat, 13 Nov 2021 15:14:46 +0800 Subject: [PATCH] fix bugs of dcg --- src/controllers/dcg_noshare_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/dcg_noshare_controller.py b/src/controllers/dcg_noshare_controller.py index b27c294..33afba7 100755 --- a/src/controllers/dcg_noshare_controller.py +++ b/src/controllers/dcg_noshare_controller.py @@ -68,7 +68,7 @@ class DCGnoshareMAC (DeepCoordinationGraphMAC): # Without decomposition, the payoff_fun output must only be reshaped output = output.view(*output.shape[:-1], n, n) # The output of the backward messages must be transposed - output[1] = output[1].transpose(dim0=-2, dim1=-1) + output[1] = output[1].clone().transpose(dim0=-2, dim1=-1) # Compute the symmetric average of each edge with it's flipped counterpart return output.mean(dim=0) -- GitLab