C1_W3 Programming Assignment (Regularized cost : nan)

Hi all,

I am struggling with week 3 programming assignment. In exercise 5, I have written the code which seems correct but while trying to print regularized cost I get an error as:

Regularized cost : nan
All tests passed!

Is there anything I am doing wrong? Help please! Thank you.

I suspect there is an error in your code. “NaN” means “not a number”. So your code is doing something that computes a result that isn’t a number.

1 Like

Thank you for the prompt response.

I ran the same code today, it worked lol. Original shape of the training data was (100,2) and Mapped was (100,27) yesterday, however today it shows (118,2) and (118, 27), that’s a weird one.

There are two different data sets used in this assignment. They use the same variable names. Perhaps this caused your confusion.

1 Like