Course 1 - week 4 Ex-9 L_model backward : I can't figure out why is this error

I think the problem is that you are manually writing out what the relu_backward function does, but you missed some of the subtleties there. They gave you that function: why not just call it? You can examine the source code by clicking “File → Open” and then looking at the file You’ll notice that when they compute dZ it involves making a copy of dA. That is because of the way object references work in python. Here’s a thread which explains that.