Week 4 DNN App- Two layer Model- Datatype mismatch

I think you are fundamentally missing the point here. The point is not to debug your compute_cost function so that it works. That was in the previous exercise. In this exercise, they provided their own implementation. Look at the “import” cell early in the notebook and then click “File → Open” and have a look at the appropriate dnn_utils “dot py” file.

As I commented in two of my earlier replies: it is a mistake to copy over your own code from Step by Step into this assignment notebook.

If you are running locally, you should simply download all the associated files. There is an easy way to do that, which is described on the relevant topic in the FAQ Thread.