Aan de slagGa gratis aan de slag

How many parameters in a deep CNN?

In this exercise, you will use Keras to calculate the total number of parameters along with the number of parameters in each layer of the network.

We have already provided code that builds a deep CNN for you.

Deze oefening maakt deel uit van de cursus

Image Modeling with Keras

Cursus bekijken

Oefeninstructies

Summarize the network, providing a count of the number of parameters.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# CNN model
model = Sequential()
model.add(Conv2D(10, kernel_size=2, activation='relu', 
                 input_shape=(28, 28, 1)))
model.add(Conv2D(10, kernel_size=2, activation='relu'))
model.add(Flatten())
model.add(Dense(3, activation='softmax'))

# Summarize the model 
____
Code bewerken en uitvoeren