Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

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

    Chris AchardChris Achard
    pythonpython
    ^3.0.0

    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.

    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Discuss

    Discuss

    Transcript

    Transcript

    Instructor: 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.

    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.

    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.

    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.