Help with code Exercise 5

{Moderator’s Edit: Solution Code Removed}

Im stuck here and I keep reading back in my notes but I can’t find the solution. What am I missing?

Hello @Kyle_Robert_Gorter
Share the screenshot of the error message or traceback here. Kindly note : Posting code here is against community guidelines.

Hey @Kyle_Robert_Gorter,
Welcome to the community. In the formulation of dw, X and (A-Y).T are supposed to undergo dot product, whereas, your current code is doing element-wise multiplication. So, either change your code to:

dw = 1/m * np.dot(X, (A - Y).T)

or

dw = 1/m * X @ (A - Y).T

Let us know if this helps.

P.S. - As @jenitta.jebaraj pointed it out, posting code in the public forums is strictly against the community guidelines, so, please refrain from doing so in the future.

Cheers,
Elemento

It works! Thank you!

So I can’t share code, what can I share exactly?

Also, would the grader throw issues if I were to submit my assignment with comments right beside my solution?

Regards

Hello @Kyle_Robert_Gorter

You can share the screenshot of the error message or traceback so that mentors can see that and help you.

No. The grader does not throw error if you submit with comments beside your solution.
Happy learning!!!
Regards
Jenitta

2 Likes