Compare commits

..

No commits in common. "52d266ef91f7a075f5e0dfae94d28753ef659ca4" and "f85b9670b2bcf48b6f0bc6c8906f7d8ee97964b6" have entirely different histories.

2 changed files with 2 additions and 2 deletions

View file

@ -48,7 +48,7 @@ def single_pass():
# Small test to see if autograd works.
def test():
# Input tensors.
x, y, z = tensor.Tensor(np.array([[1, 2, 3]])), tensor.Tensor(np.array([[2, 3, 4]])), tensor.Tensor(np.array([[1], [2], [3]]))
x, y, z = tensor.Tensor(-2), tensor.Tensor(5), tensor.Tensor(-4)
# Forward pass.
q = x.add(y)

View file

@ -27,7 +27,7 @@ class Tensor:
tensor._save(self, other)
def back(upstream):
return np.dot(np.ones_like(self.value).T, upstream), np.dot(np.ones_like(self.value).T, upstream)
return np.dot(np.ones_like(self.value), upstream), np.dot(np.ones_like(self.value), upstream)
tensor._back = back
return tensor