Functional API
The Functional API is a Keras interface for constructing neural-network models as directed computation graphs by connecting layers and tensors.
Deep Learning with R, Third Edition
The Keras Functional API is an interface for constructing models by connecting layer operations as a directed computation graph.
- How it is used
- Builds Keras models with multiple inputs, multiple outputs, shared layers, branches, or other graph-like topologies.
- How deep it goes
- Explains symbolic tensors, layer connections, model construction, inspection, plotting, and intermediate reuse, but defers full training-loop implementation.
- Examples
- Demonstrates a two-Dense model, a ticket-priority classifier, model plots, intermediate-output reuse, and mixed Functional-subclassed models.
- What you can do after
- Build it from scratch by declaring symbolic inputs, connecting layers, binding outputs, training with named inputs, and inspecting or reusing graph components.
Read how Deep Learning with R, Third Edition explains Functional API →
Deep Learning with Python, Third Edition
The Keras model-building interface that expresses a model as a directed acyclic graph of layers with explicit connectivity.
- How it is used
- Expresses Keras models as directed acyclic graphs when Sequential is too limited.
- How deep it goes
- Explains symbolic inputs, layer chaining, model construction, multi-input/output wiring, plotting, and intermediate output reuse.
- Examples
- Uses a two-layer stack, a customer-support ticket classifier, and reused intermediate features for a new output.
- What you can do after
- Builds graph-structured Keras models, train them with list or dict inputs and targets, and inspect or reuse layer connectivity.
Read how Deep Learning with Python, Third Edition explains Functional API →
Evolutionary Deep Learning: Genetic algorithms and neural networks
The Keras Functional API is an interface for defining neural-network models as directed graphs of layer operations and tensors.
- How it is used
- Uses functional layer composition to build reusable neural-network chunks for instinctual deep reinforcement learning.
- How deep it goes
- Demonstrates executable model construction with branching and concatenation, but does not develop the API beyond this application.
- Examples
- Uses Dense layers, parallel branches, concatenation, environment-specific inputs and outputs, and an instinct-selection list.
- What you can do after
- Builds and compiles branched Keras models from supplied layer functions.
Also covered in
What to know first
- affine transformationAn affine transformation is a mapping of the form x ↦ Ax + b, where A is a linear map and b is a fixed offset.
- directed acyclic graphA directed acyclic graph is a graph whose edges have directions and contain no directed cycles.
- neural network layerA neural network layer is a computational component or stage that transforms inputs into outputs within a neural network.
- linear layerA linear layer is a neural-network layer that applies a learned affine transformation to its input, typically using weights and a bias.
Related concepts
- Sequential modelalternative to · A sequential model is a neural-network model comprising a linear, ordered stack of layers through which data flows from input to output.
- deep learningused by · Deep learning is a machine-learning approach that uses neural networks with multiple computational layers to learn representations from data.
- model subclassingalternative to · Model subclassing is a technique for defining a neural-network model by creating a class that extends a model base class and specifies its computation.
- directed acyclic graphuses · A directed acyclic graph is a graph whose edges have directions and contain no directed cycles.
- computation graphuses · A computation graph is a directed graph whose nodes represent computational operations or values and whose edges represent dependencies between them.
Questions about Functional API
What is Functional API?
The Functional API is a Keras interface for constructing neural-network models as directed computation graphs by connecting layers and tensors.
Which Manning books explain Functional API?
Deep Learning with R, Third Edition, Deep Learning with Python, Third Edition and Evolutionary Deep Learning: Genetic algorithms and neural networks.
What should I know before learning Functional API?
Manning books that teach Functional API usually introduce affine transformation, directed acyclic graph, neural network layer and linear layer first.
What is the difference between Functional API and Sequential model?
The Functional API is a Keras interface for constructing neural-network models as directed computation graphs by connecting layers and tensors. A sequential model is a neural-network model comprising a linear, ordered stack of layers through which data flows from input to output.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


