Hi! I don’t understand how to code for exercise 2. I keep hard-coding it, which is wrong. Another guy asked a similar question, and the mentors helped him, but I don’t fully understand what they were trying to say. Please help. Thank you!
I will try to answer here. Exercise 2 asks you to make the function
layer_sizes, which has as input the training data
X and the training labels
It must return
n_x, the input layer size (number of examples) and the output size
n_y (also the number of examples).
You can extract it by exploring both