DLS course2 week2

Does anyone know why can I only use parameters[W] as the base of shape to initialize v[dw] instead of grads[dw]? (I had tried if I used the latter ones, the codes would have error in latter part

The problem is that in the “initialize” routines, the grads dictionary is not one of the arguments to the function, right? You only have access to parameters, since that’s the only argument to the function. If you reference grads, you are referencing a global variable and that’s a mistake. It may accidentally work in some cases in the notebook, but it will not end well when you call the grader.