Forward prop in Numpy: Regulation shape of Matrix W

In Slide Forward prop in Numy and the lab CoffeeRoastingNumpy, we input W calculated earlier to make layer and compute the predict, but I don’t understand why we stack W into 2x3 matrix. For easier to understand (with me :sweat_smile:) can we stack to 3x2 and loop through each row which respectively order vector w1, w2, w3 to calculate z. Is there any standard for this?

We can do it whichever way we want, as long as all the maths are correct, but unless it comes to an assignment and the autograder has some requirement about it.

As for “standard”, I think it’s more about who and what tool you are working with. Tensorflow arranges weights in a matrix of shape (number of neurons(features) in the last layer, number of neurons in this layer).


1 Like