Hi all,
I am trying to the the propagate code working but getting syntax error. Tried to restart the kernel and still not fix.
can you help me whats wrong with this?
{moderator edit - solution code removed}
error as below:
File “”, line 47
dw = (1/m) * np.dot(X, (A-Y).T)
^
SyntaxError: invalid syntax
Hi Hamid,
Check the cost equation. The syntax error that you are seeing is because you are missing a parenthesis to close the numpy function that does the dot product. The name of the numpy function to calculate the dot product is np.dot, not np.dpt. Also, double check the derivation of the cost function to make sure you are calculating the cost function correctly.
1 Like