Week 2 Exercise 5 propagate function

Hi, Ryan.

That just means you have the old version of the notebook. I added the logic to also print out my Z values

Z = w^T \cdot X + b

before computing A and here’s what I get for the propagate test cell:

m = 3
Z = [[ 8.5  0.5 -5.9]]
A = [[0.99979657 0.62245933 0.00273196]]
dw = [[ 0.25071532]
db = -0.1250040450043965
cost = 0.15900537707692405
m = 4
Z = [[ 6.5  8.5 -1.7  8. ]]
A = [[0.99849882 0.99979657 0.15446527 0.99966465]]
All tests passed!

The point is that second test (the one from public_tests.py) has also changed in the latest version of the notebook. It has m = 4 and some different input values. You need to use the “get a clean copy” procedure from the FAQ Thread to get the latest version. Note that you need to delete the file public_tests.py before you do the “Get Latest Version”, so that you pick up the new version of that file which has the fix in addition to the notebook file itself. You need to move the notebook file aside (as described in the instructions) and then “copy/paste” over your work to the new copy.

The instructions are pretty clear that the “Get Latest Version” procedure will never overwrite an existing file, so you need to move your version of the notebook aside and also delete all the utility files (the dot py files) you see when you click “File → Open” in order to get the updates.

The other big topic here is how “updates” work when the course staff publishes a new or fixed version of something. They can publish any given update either as a “forced update” or not. I think they usually used “forced” updates, so you get it without any action on your part. Then you need to recover any of your work from the saved copy of the notebook that they moved aside (the date will be interpolated into the name) and saved for you. So it looks like they must have published the latest fix as a “self paced” fix that you have to ask for. Well, either that or there is something about your situation that I don’t understand.

1 Like