Keras: find out the number of layers
model.layers will give you the list of all layers. The number is consequently len(model.layers)
Is there a way to get the number of layers (not parameters) in a Keras model?
model.summary() is very informative, but it is not straightforward to get the number of layers from it.