Very minor issue with week 3 programming assignment in Course 1

In the programming assignment “Planar data classification with one hidden layer” there is a small issue with the function nn_model. When you write the function, if you hardcode the number of hidden layers to be 4 rather than using the parameter n_h passed into the function, the notebook doesn’t catch it. Everything is fine until you get to the optional part with comparisons of different n_h values. This part obviously doesn’t work if you hard coded n_h as 4.

Maybe this is mistake is too silly to take into account. I only made it thanks to a combination of sleep deprivation and over-excitement. But it did lead to me getting very confused while running the optional part…

Hi, Magnus.

Thanks for pointing this out. I tried one version of that bug and you’re right that the tests in the notebook don’t catch it. With my implementation, the grader does fail, although the message is pretty cryptic.

I’ll file a bug to the course staff about this. Thanks for documenting it!