diff --git a/functions.py b/functions.py index cb80c1a0efcb486f7eb32afc6ed0d63369a2eafd..7eded801250ff8cf0a04ddf2851cf97cd1d2e525 100644 --- a/functions.py +++ b/functions.py @@ -143,8 +143,8 @@ class MatMul(_Function): # TODO: Implement the derivative dx for this opetation and add the # result of the chain rule on self.dx. ####################################################################### - self.dx = grad * np.add(self.x.data, self.y.data.transpose()) - self.dy = grad * np.add(self.x.data.transpose(), self.y.data) + self.dx = np.add(self.x.data, self.y.data.transpose()) + self.dy = np.add(self.x.data.transpose(), self.y.data) ####################################################################### # --------------------------- END OF YOUR CODE ------------------------ #######################################################################