Neural Network Construction

Learn about TensorFlow’s sequential model building, from initializing layers to model fitting.

TensorFlow provides a simple-to-implement APIApplication Programming Interface for constructing deep learning models. There are three general approaches:

  • Sequential
  • Functional
  • Model subclassing

The ease of their use is in the same order. Most modeling requirements are covered by the sequential and functional approaches.

The sequential approach

Sequential is the simplest approach. In this approach, models that have a linear stack of layers and the layers communicate sequentially are constructed. Models in which layers communicate non-sequentially (for example, residual networks) cannot be modeled with a sequential approach. Functional or model subclassing is used in such cases.

Multi-layer Perceptrons (MLPs) are sequential models. Therefore, a sequential model is initialized, as shown below.

Get hands-on with 1400+ tech skills courses.