Mistake in course 2 week 1 assignment 3

Has anyone gone through deep learning specialization course 2 week 1 assignment 3 . in it i think to calculate difference for grad approx and grad . for grad approx it is in vector which is right . but grad is in a dictionary . i am trying to use dictionary_to_vector function to make it a vector . but it seems dictionary_to_vector only handles the parameters dictionary . Please correct me if i am wrong . everyone here may be had gone through it right . do i need to implement dictionary_to_vector for gradients on my own or is there any work around

Please note that they provided you two different “helper” functions to deal with those two different cases:

dictionary_to_vector to deal with the parameters
gradients_to_vector to deal with the gradients

This was mentioned in the instructions. As a general rule, please note that “saving time” by not reading the instructions carefully frequently ends up not being a net savings of time. :nerd_face:

Also note that you filed this under AI Discussions, which is a general category. You’ll have better luck getting timely answers if you file your course related questions in the appropriate Course Q&A subcategory for your course. I used the little “edit pencil” on the title to move it for you to DLS C2 W1.

I just went back and looked at that code again in a clean version of that assignment and they actually wrote all that code for you in the template. So you must have purposely rewritten it in order to have a problem there. You could have just used the code they gave you and it should have been fine.

Ok thank you for your clarification in the assignment and also thank you for clarifying where to ask the questions . i am glad you responded . It’s completely my mistake . i will try not to repeat it again . thank you

I just tried to write it from scratch but i tried to use the gc_utils . but due to my recklessness i missed the function gradient_to_vector . sorry for the trouble .