Functional APIs
Functional APIs build more advanced models than sequential APIs. For example, if you need a model with multiple inputs and multiple outputs, it's not possible using Sequential APIs. Functional APIs provide that flexibility. Also, using functional APIs, you can define models with shared layers. Further, models with residual connections can only be defined using Functional APIs.
The creation of neural network layers using Functional APIs happens through Python callables (Python objects that can be called). As part of building deep learning models, which are usually a stack of layers, and in contrast to Sequential APIs where you first create the tf.keras.Sequential model and then add layers one by one, in Functional APIs, we ...
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