I am new to Keras and my looking into the functional api model structure.
1-
As mentioned here in docs. The keras.Model takes only input and the output argument, and the layers are listed before the Model. Can someone please tell me how the keras.Model knows about the layers structures and the multiple layers between input and output, when all we are passing is just the input and output arrays.
2 -
Also, what is output of layers.output or layers.input. Is the output not a simple tensor? I see below output when I print layers.output using syntax from this example for some other layer. Looks like layers.output and layers.input contains the layer info as well, like dense_5/Relu:0. Can someone please clarify what the components of below output stand for
print [layer.output for layer in model.layers]
output:
[<tf.Tensor 'input_6:0' shape=(None, 3) dtype=float32>,
<tf.Tensor 'dense_5/Relu:0' shape=(None, 4) dtype=float32>,
<tf.Tensor 'dense_6/Softmax:0' shape=(None, 5) dtype=float32>]