Deep Neural Network Week 4-Assignment 3

What do you mean “remove extra cost variable”? If you mean that your L_layer_model function returns only one return value, that means you have made a mistake. Either you mistakenly edited the template code that was given to you to remove the second return value or perhaps you “copy/pasted” the entire function from an earlier version of the course in which there was only one return value from that function. In either case, you need to fix your L_layer_model so that it has the correct two return values. The best way to do that would be to get a fresh copy of the notebook and then carefully “copy/paste” over just your completed code from the “YOUR CODE HERE” sections and don’t modify the given template code. There is a topic about how to do that on the FAQ Thread, q.v.

For future reference, please note that anytime you feel you need to change the given test code in order for things to work, that is the wrong approach. If the test is failing, that means your code is incorrect and you need to think harder to figure out what is wrong with your implementation rather than changing the test code.

1 Like