Fix tensor.add to diff. matrices properly

This commit is contained in:
Aodhnait Étaín 2020-11-15 19:45:51 +00:00
parent c1c48bb693
commit 52d266ef91

View file

@ -27,7 +27,7 @@ class Tensor:
tensor._save(self, other) tensor._save(self, other)
def back(upstream): 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 tensor._back = back
return tensor return tensor