concept functional api in category R
appears as: functional API

This is an excerpt from Manning's book Deep Learning with R.
There are two ways to define a model: using the keras_model_sequential() function (only for linear stacks of layers, which is the most common network architecture by far) or the functional API (for directed acyclic graphs of layers, which let you build completely arbitrary architectures).
In the functional API, you build your input and output layers and then pass them to the keras_model function. This model can be trained just like Keras sequential models.
Let’s start with a minimal example that shows side by side a simple sequential model and its equivalent in the functional API: