Local variable 'linear_cache' referenced before assignment

I get this error during the first programming exercise of week 4:
local variable ‘linear_cache’ referenced before assignment

What does it mean? Thanks a lot for the help!

Hi @rozenn

Welcome to the community.

Please, share with is a screenshot of your error output.

Best regards

Hi elirod,

Here it is:

Thank you, @rozenn

Seams like your code is calling a variable that wasn’t assign or declare before.

Try to run all the previous cell code and try again.

I did, and I still get this error.

Please note that relu is not the same as “relu”.

So, it might be a issue with your code logic. If have a Conditional statement that is related to this variable, but is never execute because some sort of constraint in you logic than you variable will never initiate.

Please, try to debug your code in order to check this issue.

Also, would you mind to share your notebook with me.

You can send me a private message by clicking in my avatar. After that, hit the message button.


Hi, thanks for your help! It was actually the quotes missing for calling the activation function :slight_smile:

1 Like