Note that the mentors do not have the superpower to examine your notebooks, so I can only reason from the results you show. It’s clear that your cost code generates different values on both of the test cases there, but it looks like everything else is correct. So you need to carefully compare your implementation of the cost to the math formula. If you used np.dot, make sure that you used the transpose correctly. You have two 1 x m vectors, right? So you need to be dotting 1 x m dot m x 1 in order to get a 1 x 1 output. If you dot m x 1 with 1 X m then you get m x m and summing that does not give the same result. Here’s a thread about that.
1 Like