Hi,
In my forward propagation step in the Week 3 assignment, I’m getting this error:
Notice, I’m printing X and W1. To compute Z, I’m using np.dot()
In the spirit of dimensional analysis, a 4x2 matrix for W1 would lead me to expect a 2x4 matrix for X, but I’m getting a 2x3 matrix. Earlier in the layer_sizes()
function, we were instructed to hard code n_h
to 4 because we are building a model with 4 nodes in the hidden layer. Based on my dimensional analysis, if I’m given a 2x3 input matrix (X), then I expect to initialize a 3x2 W1 matrix…but that n_h
is hard-coded to 4. If you look at the initalize_parameters()
comments, it says to initialize W1 to be a matrix of shape (n_h, n_x).
The forward_progogation_test_case
initializes an input (X) matrix of 2x3:
What am I not understanding correctly?
Thanks in advance.