MLS C1W3 Practice Lab: Compute Gradient

I have tried so many times but db_dw value is not coming as expected…I followed the indents as per Hints for ith Example and jth feature loops…

Need some help to rectify code

Hi @Syed_Asghar_Abbas_Na ,

Can you send me your code in a dm and I’ll take a look.

Sam

1 Like

If you don’t mind post it here also, I’d like to see it as well.

Gradient Output
https://community.deeplearning.ai/t/re-wrong-values-for-dj-db-and-dj-dw-at-initial-w-b-zeros/285409/3?u=syed_asghar_abbas_na

Test Output
https://community.deeplearning.ai/t/re-wrong-values-for-dj-db-and-dj-dw-at-initial-w-b-zeros/285409/4?u=syed_asghar_abbas_na

My Code
https://community.deeplearning.ai/t/re-wrong-values-for-dj-db-and-dj-dw-at-initial-w-b-zeros/285409/5?u=syed_asghar_abbas_na

dj_dw , and dj_db by m is inside the loop to my understanding as one indent to the right from For Loop…I moved this line to further left and even right…Out put is still no as per expected…

Please help me to go through this…I want to start the next course at the earliest

Gradient Output
https://community.deeplearning.ai/t/re-wrong-values-for-dj-db-and-dj-dw-at-initial-w-b-zeros/285409/3?u=syed_asghar_abbas_na

Test Output
https://community.deeplearning.ai/t/re-wrong-values-for-dj-db-and-dj-dw-at-initial-w-b-zeros/285409/4?u=syed_asghar_abbas_na

My Code
https://community.deeplearning.ai/t/re-wrong-values-for-dj-db-and-dj-dw-at-initial-w-b-zeros/285409/5?u=syed_asghar_abbas_na

dj_dw , and dj_db by m is inside the loop to my understanding as one indent to the right from For Loop…I moved this line to further left and even right…Out put is still no as per expected…

Please help me to go through this…I want to start the next course at the earliest

Hi,

I’m unable to access those links.

I have the same problem and d can’t figure out what went wrong. Could someone look at my code?

No need. I figured it out. Confused mutiplication and addition at one point.