Adding new prediction layers on top of a feature extractor is straightforward (compared with previous examples with TensorFlow Hub), as it is just a matter of adding new layers on top of the corresponding model. For example, this can be done as follows, using the Keras API:
dense1 = Dense(...)(feature_extractor.output) # ...
new_model = Model(model.input, dense1)
As we can see, through Keras, TensorFlow 2 makes it straightforward to shorten, extend, or combine models!