09.05.2023 Views

pdfcoffee

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

TensorFlow 1.x and 2.x

Figure 2: An example of a Sequential model

Functional API

The Functional API is useful when you want to build a model with more complex

(non-linear) topologies, including multiple inputs, multiple outputs, residual

connections with non-sequential flows, and shared and reusable layers. Each layer

is callable (with a tensor in input), and each layer returns a tensor as an output.

Let's look at an example where we have two separate inputs, two separate logistic

regressions as outputs, and one shared module in the middle.

[ 64 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!