3.1 - Create the Sequential Model

Week 1, Excercise 2: Convolution_model_Application

AttributeError: The layer has never been called and thus has no defined output shape.

Hi, I don’t know how to solve the implementation of model = tf.keras.Sequential ([

I get an error that I do not understand, can you help me?

The exercise
Exercise 2 - convolutional_model
I solved it correctly, I don’t understand how the Sequential works …

The Sequential Model uses a list of layers to build its network. So from the start of the list to the end, the model is built sequentially connecting the layers. So, if the list of layers is something like [MaxPool, Conv2D, Reshape, Dense, Activation], the model will be input → MaxPool → Conv2D → Reshape → Dense → Activation → output.

The error you were having was because you did not specify the input shape, which is an optional argument you can include.

1 Like

resolve: tfl.ZeroPadding2D(padding=3)(64,64,3) change for tfl.ZeroPadding2D(padding=3, input_shape=(64,64,3)),