Forward Propagation with Dropout Error in First Week Second Assignment

I’ve looked over my code a million times and still find this
error. Every single time I run the cell, it gives me this:

A3 = [[0.49683389 0.05332327 0.04565099 0.01446893 0.49683389]]
Error: Wrong output for variable in position 0.
Error: Wrong output for variable in position 1.
Error: Wrong output for variable in position 2.
Error: Wrong output for variable in position 5.
Error: Wrong output for variable in position 6.
Error: Wrong output for variable in position 7.
Error: Wrong output for variable in position 10.
Error: Wrong output for variable in position 11.

I don’t know what the bug in my code is, especially since it says that that I have the “Wrong output for variable in position 0,” which would just be my Z1 value, and all I used to calculate the Z1 was “Z1 = np.dot(W1, X) + b1.” If anyone knows what my problem might be, it would really help. Thank you!

The most common error on this exercise is using the wrong PRNG function. It should be np.random.rand. Please check to make sure you are not using np.random.randn instead. That little “n” on the end there ruins everything. :nerd_face:

Thank you! This fixed my code!