[Course 2, Week 1, Programming Assignment 2, Exercise2] Typo in backward_propagation_with_regularization

Apparently, there is a typo [+ None] to be corrected here

{mentor edit: image removed}

Thanks!

Your code does not pass one of the test cases.

If there’s a typo, it’s in the code you added (or you modified some of the given code that should have been left alone)

Note, I’ve removed the image from your message, because it included some of the code you wrote - posting your code on the forum is not allowed by the Code of Conduct. Please just post your error messages.

Incorrect on a couple of counts.
1.a. My code followed the Assignment Instructions in a Section I can’t edit.
1.b. The same Section [I can’t even edit!] contained the Typo(s).

2.a. By the way, I saw the very same Typo(s) on another image posted to the Forum by someone else.
2.b. And yes, there are images with users’ code out there.
2.c. For consitency, you may want to remove them too if it’s against the rules indeed as you claim.

TY
/CD

“Code that you can’t edit” are code cells that are testing your code. They don’t have any typos. They’ve been used for many years and have been thoroughly evaluated.

If a test cell throws an error, it is because your code doesn’t give the correct return values, or is causing a runtime error, for a specific test case.

I am not going to repeat myself and/or to argue with you.

Take care.
/Constantine

That’s fine. I hope you area able to resolve the problem.

I think you simply misunderstood what was meant by that + None: it means you need to replace the None with the appropriate code to compute the gradient of the regularization term. But you simply deleted it, which is why the test fails.

They gave you the base code for computing the gradients without regularization and the whole point of this section of the assignment is how do we take the regularization term into account. It’s part of the cost function on forward propagation, so it needs to be part of back prop as well, right?

Oh, come on! None means None. The proper way to express what you’ve written is a simple yet elegant clause your own code goes here.

Thank you.
/Constantine

PS. I did complete my Assignments for the Week 1 a day prior to the Deadline despite starting late. Do not make it about me please.

I’m glad to hear that you were successful in this assignment.

When you are the course provider, you can decide how you want things done. When you’re taking someone else’s course, you need to understand how they do it. Also note that the mentors here are not responsible for creating any of the course materials.