C1 W4 A1 EX8 - not enough values to unpack

Hi

When I try to run my code for exercise 8 (linear_activation_backward), I get a ValueError: not enough values to unpack. However, I don’t know where I’m going wrong…

This is the code I wrote:
dZ = relu_backward(dA, activation_cache)
dA_prev, dW, db = linear_backward(dZ, cache)

Could somebody help me please?

In future it would be more helpful if you post the actual exception trace, so that we can see which line is causing it to “throw”.

Well have you looked at the definition of the relu_backward and linear_backward functions? What values do they return? You just got done writing linear_backward, right? For relu_backward, you can find it by clicking “File → Open” and then opening the appropriate “dot py” file. You can figure out the name by examining the “import” cell at the beginning of the notebook.

Debugging is part of the job of programming, right? I’m trying to give a Lao Tzu “Fishing Lesson” here instead of just handing you a nice tasty fish. :laughing:

Actually I bet the error is being thrown inside linear_backward. Which line throws the error? I’ll bet it’s the one that “unpacks” the cache value. So what does it expect there and what did you pass?