C1_W3_Logistic_Regression, excercise2

I tried to rectify indentation, and also removed lambda!
But the cost at initial w still appears to be this. please suggest solutions.

Hello @USMAN_IQBAL_IQBAL_HU,

I strongly suggest you to print the variables used in your code to keep track of the progress of your function. Please see an example here. The example demostrated how you can examine your function with a simple input created by you together with some print lines. In this assignment, everything done with the code can be verified by you. It is also a common task and skill for us to debug our own code, when it does not work as expected, just like your case.

Cheers,
Raymond

1 Like

HI @USMAN_IQBAL_IQBAL_HU

in addition to what [rmwkwok] said please make sure you used the parameters which send in the function of compute_cost and also you didn’t change any values of these parameters

please feel free to ask any questions,
Thanks,
Abdelrahman

1 Like