From 52d266ef91f7a075f5e0dfae94d28753ef659ca4 Mon Sep 17 00:00:00 2001 From: aodhneine Date: Sun, 15 Nov 2020 19:45:51 +0000 Subject: [PATCH] Fix tensor.add to diff. matrices properly --- pygrad/tensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygrad/tensor.py b/pygrad/tensor.py index 54a7e6b..b424390 100644 --- a/pygrad/tensor.py +++ b/pygrad/tensor.py @@ -27,7 +27,7 @@ class Tensor: tensor._save(self, other) def back(upstream): - return np.dot(np.ones_like(self.value), upstream), np.dot(np.ones_like(self.value), upstream) + return np.dot(np.ones_like(self.value).T, upstream), np.dot(np.ones_like(self.value).T, upstream) tensor._back = back return tensor