W4_A1_Ex-3_Linear Forward_Assertion error

Here is what the template code looks like in a clean version of this notebook for the linear_forward function:

    #(≈ 1 line of code)
    # Z = ...
    # YOUR CODE STARTS HERE
    
    
    # YOUR CODE ENDS HERE
    cache = (A, W, b)
    
    return Z, cache

Notice that you changed the code that sets the value of cache. Why did you do that? That should not have needed to be changed.

Normally you only need to change the code in the “YOUR CODE HERE” sections. It’s not illegal to change other things, but you’d better make sure you know what you are doing when you change other things.

If you want to get a clean copy of the notebook to check the other things that you didn’t need to change, there is a topic about that on the DLS FAQ Thread.