Hello, I’m starting on the first assignment of Week 4 and I’m confused about the wording in the “2 - Outline” section.
-
Confusion #1: If this is a two-layer neural network, then L = 2, right ? What does it mean “build a two-layer neural network AND an L-layer neural network.” ?
-
Confusion #2: The term “LINEAR” appears everywhere in this intro section, such as [LINEAR->SIGMOID]. And even in the figure down below, in the purple and red regions, I saw “Linear Sigmoid Forward” and “Linear Sigmoid Backward”. But, sigmoid, as we know, is a nonlinear function.
-
Confusion #3: While the outline of this assignment says that this is a two-layer neural network, the figure shows the " . . . " between the first layer and the second layer, giving me the impression that there are multiple layers in between.
Please clarify, thank you!
-
They are walking you through two different cases: the first “2 layer” network is hard-coded just to have … wait for it … two layers. Then they have you implement the fully general case where L can be any value.
-
In the forward propagation for every layer, there are two steps, right? The linear step:
Z^{[l]} = W^{[l]} \cdot A^{[l-1]} + b^{[l]}
Which is then followed by applying the non-linear activation function g^{[l]}:
A^{[l]} = g^{[l]}(Z^{[l]})
- Sounds like just a slightly misleading picture. If they tell you there are just two layers, then assume there are just two layers.
Thanks Paul!
I’m excited in finishing up this first course of this Specialization but I got hung right on Exercise #1 (initialize_parameters). I cannot believe it! Here’s what I have:
{moderator edit - solution code removed}
which is straightforward and consistent with the instruction. However, it complained about b1
TypeError: data type not understood
But, data type is what passes in for n_h, beyond my control.
You need to look more carefully at the documentation for np.zeros. The API is different than np.random. Why, you ask? “Because.” Seriously. This is the beauty of Open Source Software: it’s free but there is no guarantee of conceptual consistency in the various APIs. We just have to read the documentation and “deal with it”.
You are not using that API correctly, which is why the code fails. You must have gotten this to work in the Week 3 assignment, so compare your code there.
1 Like
I just looked at Numpy documentation for np.zeros and got passed it, thanks Paul !
1 Like