Transfer Learning with multiple outputs

This may correspond to Week 3 as well. I wonder how to build the classification layers of a Tf.keras functional API to have simultaneously two outputs (two predicted “y-hats”) for every input image. Say: how many people are in the image (say: 0, 1, 2, 3, >3) and is the weather “good” or “not good”. Is the question premature? Will the issue be covered later in the course?

Hi, @EduardoChicago!

You can simply chain layers as you want to create multiple inputs or outputs. Check this tensorflow documentation for more details.

It is common in the early parts of these (and other) classes that a deep learning network is defined to output a single floating point value. But there is nothing that requires this to be so. As long as the training data, the loss function, and the network architecture are aligned, you can produce any number of outputs. In the Object Detection lectures and programming exercise, you will work with the architecture known as YOLO (from You Only Look Once) that produces over 150,000 values from each forward pass.

thanks Alvaro. I’ll check.