What model.layers[4]

In the W2 second assignment, the first line of 3rd exercise is model.layers[4]. I don’t know what this code does? in TensorFlow website part tf.keras.Model, I didn’t find any relevant material about that.

Please see the summary method in test_utils.py to understand how a model layers can be iterated over. The method is invoked via summary(model2) from within the notebook.

Model layers can be accessed just like a regular list which is 0 based. model.layers[4] returns the 5th layer that makes up the model.