Get startedGet started for free

Shape of the weights

A Keras neural network stores its layers in a list called model.layers. For the convolutional layers, you can get the weights using the .get_weights() method. This returns a list, and the first item in this list is an array representing the weights of the convolutional kernels. If the shape of this array is (2, 2, 1, 5), what does the first number (2) represent?

This exercise is part of the course

Image Modeling with Keras

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise