In the programming exercise, when defining the layer sizes, why is the size of the output layer (n_y) equal to 2? Is it not a single node with four inputs, yielding dimensions of 1 by 4? This would then also correspond exactly to Video 2
(Neural Network Representation) @ 4:44 minutes where the network architecture is very similar to the one pictured in the jupyter notebook but the dimensions there are also presented as 1 by 4.
Hello @Lukas_Spiess
In the programming exercise, when defining the layer sizes, the size of the output layer (n_y) but not the shape of the output layer is equal to 2 is because it is defined in the public test cases. It is just to test your code is working fine or not. You should not relate the exact output with the videos but you can compare the concepts. You can see in the assignment when defining the nn_model() the values for n_x, and n_y are different.
There in that code block we are taking the parameters X and Y in layer_sizes(X, Y) which is defined in the public test cases, and returning the input size, hidden layer size, and output size (i.e. n_x, n_h, n_y) but not the shapes(dimensions). If you try printing the shape of Y, you will get it.
Hope my explanation clears your doubts.
All the best