How it works...
To create a model using the functional API, we need to create the input and output layers independently, and then pass them to the keras_model() function in order to define the complete model. In the previous section, we created a model with two different output layers that share an input layer/tensor.
In step 1, we created an input tensor using the layer_input() function, which is an entry point into a computation graph that's been generated by the keras model. In step 2, we defined two different output layers. These output layers have different configurations; that is, activation functions and the number of perceptron units. The input tensor flows through these and produces two different outputs.
In step 3, we defined our ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access