Why do we need to specify inputs when creating the model?

Here is the line of code for creating the U-Net model in Assignment 2 of Week 3 of Course 4:

model = tf.keras.Model(inputs=inputs, outputs=conv10)

However, conv10 is constructed based on conv9 and conv9 is constructed based on ublock9 etc. until we reach the input layer. So, it seems that conv10 contains all the information about the network. Hence, why do we need to pass the input layer to Model?

For one, keras’ functional API, and with that tf.keras.Model require you to specify the input as its not automatically programmed to find the start of the graph.

This also allows for cool things like having multiple inputs for your model, having branches among other things. You can also extend the network by let’s say adding a different series of layers before input if you want to with this. (You could read the functional api doc to see examples of such)