Course 1 week 4 assignment 2 2 layer and l layer

I explained the problem on the other thread on which you posted this question. The problem is that you have copied an old version of the function template. They changed the definition of the top level “model” functions in April 2021, so it doesn’t work to copy an old version. It’s also cheating if it’s not your own work. Please start with a clean copy of the notebook to get the correct definition of the functions. You may be able to copy over some of your work from the “YOUR CODE HERE” sections, but even there you have to be careful to notice any changes required between your old code and the new way things work. See the link I gave for more instructions.