So in this video, we will see how functional EPA can help us build complex neural network architectures.
We have been building symbol architectures that as input goes in to bolster the layer, which goes in
to second, how to lower the output of which goes into the final output.
Clear.
Now will slightly modify this architecture.
We will take this input and merged with the output of it.
And layer to that is will create an additional concatenation layer where the output of the layer two
will be there and the input layer will also be added here.
So Andy can guard clear.
Will have 64 values from the hood and layer two because it has sixty four units of neurons and 13 values
from the input layer.
Because we have 13 variables.
So in the concatenation layer, we have 77 values, which will be input into our final output layer,
which has a single layer on.
So this kind of architecture is called deep and wide architecture.
And this architecture cannot be built using a sequentially big.
This is the functionally B.A. is used.
No, let's go back to our studio.
Now, let's see how we can create that architecture using functional Libya.
The first step is same.
We have to define the input layer input layer as those 13 variables only.
So we define the input layer with a shape of 13 variables.
The first production layer has only to be an alert after which will come the concatenation layer.
So in the first prediction layer, we keep the two hidden layers.
We specified that this layer has the input from inputs.
Splunk does the rebuild that we define for input layer.
Then we have to put the layers after these two hidden layers.
We need a concatenation layer in this layer.
The output of this.
First output layer will be concatenated with the initial input layer.
How do we do that?
We create this new layer, mean output in this, we concatenate these two parts.
The first part is the prediction func.
This includes these three layers.
And we also add the input func, which is this input layer.
So these two now become the input layer of this main output.
And this goes into the last layer, which is a dense single unit output layer.
I hope you understand the architecture that we have defined here.
We have this input layer.
This is we what we stored in input funk.
Then we created predictions funk, which contains the two hidden layers.
Then we create main output structure in which we take the output of this prediction's, funk and the
input layer and we concatenated to create a can godlee after which we put a output layer of one single
neuron.
So all this is done in this part.
You can notice here that input slier has been used twice.
This has been made possible because in functional EPA we are having each layer as individual part of
the structure.
So we can use those parts many times in this structure.
So this input funk became a part of the predictions funk variable also.
And it became part of the main output structure also.
So let's run this.
And now we will define the architecture of our model using Kiraz model function in which we will claim
that inputs are the inputs, funk and output is to be taken from the main output structure because districted
has everything.
It has prediction, funk also and input funk also as a concatenated layer in its structure.
When we done this, we have Model FM radio.
With us is a dysfunctional eBay model and it has that complex architecture stored in it.
Now we can figure this model again.
We will use automats properties optimizer.
Lost is messy and the metrics to be recorded is mean absolute.
You can see the structure of this model funk also using somebody somebody's come on, when I done this,
you can see here that the first layer is the input layer with 13 variables.
Then comes a dense 64 neutron layer, which is thicker than layer one.
It is connected to the input layer.
Then comes another dense layer, which has 64 neurons.
And it is connected to firstly the layer after this.
We have a concatenation layer in which we can gardino did the output of this dense layer with the 13
variables from input layer.
So this concatenation layer is connected to it.
Hidden layer two.
And the input layer.
Then we have the last layer, which is the output layer, which has only one neuron.
And it is connected to the concatenation.
You know, we can bring this model using different function.
And we can compare the best performance of our normal model with a normal beep architecture.
What is this complex functional model with wide and deep architecture?
So let's run these commands.
To see that the functional model that is the complex model has a test loss of 29.
Whereas a normal model has had a test loss of 32.
Similarly, the mean absolute error for our functional model that is this complex model that we have
created is forty point three, whereas the mean absolute better for the simple model that we created
earlier was four point forty seven.
So there is slight improvement on both of these parameters.
Now you have seen how to use functionally B.A. to create complex neural network architecture because
functional IPA enables us to use several layers or several structures multiple times also in that example.
This time we saw the regression problem, the few differences that we have.
Integration problem is, instead of using accuracy, we were using MASC.
What they lost function and the metric we were observing, indignation problem was mean, absolute idiot
in the architecture of the ignition problem.
The output layer has no activation function.
So with this, we conclude our electron functionally B.A. and regression problems.