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