TensorFlow’s Sequential API helps the person to stack layers one on high of one other, simply creating linear fashions, the place the enter of every layer is at all times the output of the earlier one. However what occurs when your mannequin must deal with a number of inputs or outputs, shared layers, or non-linear connections? In these situations, TensorFlow’s Purposeful API permits to construct extra superior, versatile, and customizable fashions, giving the person the ability to design the advanced architectures talked about above with ease.
This text will clarify:
- What the Purposeful API is
- The way to construct a easy mannequin with the Purposeful API
TensorFlow’s Purposeful API is a strategy to create fashions the place layers are linked like a community graph, not simply stacked linearly like within the Sequential API. Think about constructing with LEGO bricks: whereas the Sequential API would simply permit us to stack blocks one on high of one other, the Purposeful API permits us to assemble bridges, towers, and paths connecting totally different areas.