Hello everyone ! I’am having a syntax error in the expression of dw and I don’t see It, here is my cost function : cost = (-1/m)*np.sum((Y*np.log(A))+((1-Y)*log(1-A)). And the the expression of my dw is : dw = (1 / m) * np.dot(X, (A-Y).T)

there is a * between -1/m and np.sum in my cost function, we just don’t see It in the publication

Thank you for your help !

Dear Mr. Mohammed,

Yes, there are many syntax errors regarding the positioning of the functions and the brackets too. Please check the location of the symbols (*) thoroughly and you will get it.

Thanks.

1 Like

Exactly. When you get a syntax error at the beginning of a line, it usually means you are missing a close parenthesis on the *previous* line. Or some other form of incomplete syntax …

1 Like