Error in programming assignment

{moderator edit - solution code removed}

AssertionError Traceback (most recent call last)
7 assert type(grads[“dw”]) == np.ndarray
8 assert grads[“dw”].shape == (2, 1)
----> 9 assert type(grads[“db”]) == np.float64

I am getting this error . Can anyone tell where is the problem???

First, you also need to use sum for cost. Second, your implementation of db is wrong. We don’t need to use dot for db. Check the equations and instructions again.

Why use sum I have used dot product

Hi @Kunal_Aggarwal ,

Can you explain your understanding of how your formula works?
db = (,1),1))/m

what I am thinking is A and Y are vector so to write a1+2+…+am-y1-y2-…-ym I have to first add all the values of A vector which can be done by dot product of A and vector 1 of size mX1 and similarily for Y and then subtrating them

Hi @Kunal_Aggarwal ,

Please have a look at the formula 8 again from the implementation instructions, what we want is the sum of all the difference between a^{(i)} and y^{(i)} for i from 1 to m examples and then to take the average of this sum by dividing it by m.