Stuck on compute_gradient function

Did you try looking at the hints given below the grader cell. It really helps you find the correct code.

or
Refer this C1_W3_Logistic_Regression UNQ_C5 UNQ_C6 ERROR PLEASE HELP - #3 by Deepti_Prasad

If you still having trouble, let me know.

Regards
DP