W4_A1_Ex5_local variable ‘linear_cache’ referenced before assignment

Did you look at this thread
Course 1 [Week 4] Assignment #1, Exercise 5 L_model_forward - #10 by minreie