In the Wk2 assignment for the DLS course where we were requested to compute the function update_parameters_with_momentum(), I computed the below functions:
However, the v[“dW1”], v[“db1”], v[“dW2”], v[“db2”] lists are all initialized as lists of zeros. The v[“dW”+ str(l)] and * v[“db”+ str(l)]* has always referred to lists of zeros. Hence, the previous results in v[“dW”+ str(l -1)] or v[“db”+ str(l -1)] never seemed to have any bearing over their counterpart in the next iteration.
Therefore, I was wondering if how are the momentum generated if the lth iteration calculation is not taking the v value from the previous (l - 1) iteration calculation?
I am very confused. Did I overlook something?
Not sure if I am explaining my question well, but let me know what you think.
Thank you for helping out.
Linfeng