Course1-week4:Building your Deep Neural Network Step by Step-ex.9

I find that it helps to just write out the “dimensional analysis” for all the layers before hand. Here’s a thread which gives an example of what I mean by that. Then the other thing you have to keep track of is how indexing works in python: it’s “0-based”. That applies to both indexing an array or the indices on for loops. Run the following loops and watch what happens:

for ii in range(1,5):
    print(f"ii = {ii}")

for ii in reversed(range(4)):
    print(f"ii = {ii}")