Planar data classification with one hidden layer Compute Cost

I can’t tell what the correct answer is here.

The assert in compute_cost_test(compute_cost) wants the value: 0.5447066599017815

But the expected output is listed as: 0.6930587610394646

What am I shooting for here?

Those are two different test cases, right? For the test case that is directly specified in that cell, the expected answer is shown. Since you’ve already looked at the compute_cost_test logic, it should be clear that answer applies to that test case. Different inputs give different outputs.

What answer do you get for the test case explicitly listed in that cell? If it is 0.692…, that is not a rounding error. One common mistake is to assume that the sample code they give you in the instructions is the complete solution. It’s not. Compare that code to the mathematical formula for the cost and ask yourself two questions:

  1. What happened to the factor of \frac {1}{m}?
  2. Why is there only one term? What happened to the Y = 0 term?