Understand the Structure of a Keras Model by Viewing the Model Summary

Chris Achard
InstructorChris Achard
Share this video with your friends

Social Share Links

Send Tweet
Published 6 years ago
Updated 6 years ago

We will view a summary of the different networks as we create them by using the summary method on the model. This will help us better understand the structure of the model.

Instructor: [00:01] You can print a summary of the neural network with the summary method on the Keras model. When you run that, it will print a nicely-formatted summary that contains all of the network layers and a number that represents the total trainable weights in the network.

[00:19] In general, the more weights a network has, the more complex the function it can approximate, but also, the longer it will take to train and the more data you will need to properly learn that function.

[00:32] We can change the neural network by modifying the number of nodes in a layer, or by modifying the network entirely, to get a better feel for how complex the network is, and how many trainable weights it contains.

[00:52] You can also use this summary method on networks that you didn't define yourself. It can be a helpful way to explore pre-trained networks.