From cbcf2ae95b6c0fca75f7485293f7fce1ed57ddc4 Mon Sep 17 00:00:00 2001 From: Rohith Date: Wed, 1 Jul 2020 17:54:07 +0530 Subject: [PATCH] Updated error with np.multiply --- Neural Networks and Deep Learning/week2/basics_numpy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Neural Networks and Deep Learning/week2/basics_numpy.py b/Neural Networks and Deep Learning/week2/basics_numpy.py index 8b046ec..4109c1c 100644 --- a/Neural Networks and Deep Learning/week2/basics_numpy.py +++ b/Neural Networks and Deep Learning/week2/basics_numpy.py @@ -135,7 +135,7 @@ def L2(yhat, y): """ ### START CODE HERE ### (≈ 1 line of code) - loss = np.sum(np.multiply(y - yhat), y - yhat, axis=0, keepdims=True) + loss = np.sum(np.multiply(y - yhat, y - yhat), axis=0, keepdims=True) ### END CODE HERE ### return loss @@ -153,4 +153,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main()