n_x = 12288 # num_px * num_px * 3
n_h = 7
n_y = 1
layers_dims = (n_x, n_h, n_y)
In the assignment of course1 Week4 cat classification they have written 4 layer neural network but how 4 is the size of the layer it should be 7 as n_h give the size of the hidden layer which is 7 in this case.
That is the two layer network that is the first one in Week 4, Assignment 2. Then they give you the L layer network with a layers_dims that defines a 4 layer network. Please read the later section of the notebook as well.
Sorry for the wrong interpretation i was asking for l layer neural network that how we can interpreted that it is 4 layer neural network using layers_dims
This is the definition of layers_dims for the 4 layer network:
layers_dims = [12288, 20, 7, 5, 1] # 4-layer model
So the input has dimension 12288 and we have 4 layers:
Layer 1 maps 12288 to 20 output neurons.
Layer 2 maps 20 inputs to 7 output neurons.
Layer 3 maps 7 inputs to 5 outputs.
Layer 4 maps 5 inputs to 1 output.
So what is your question again?
Thanks that what I want to ask how the mapping of input vector is done to get the output I need to understand the significance of layer_dims
This is all explained in the notebook. I suggest you read through it again carefully and it should all make sense, with the explanation I gave in my previous reply in mind.