Perhaps, the more convenient way to explore the structure of the network is to draw a picture. Let's do that:
from IPython.display import SVG from keras.utils.vis_utils import model_to_dot SVG(model_to_dot(model, show_shapes=True).create(prog='dot', format='svg')) from IPython.display import Image from keras.utils import plot_model plot_model(model, show_shapes=True, show_layer_names=True, to_file='model.png')
See the Figure 9.10 for the result.