C4 W1 AS2 EX1: The layer has never been called and thus has no defined output shape

In Exercise 1:
I’m defining a sequential model using the provided code in exercise. I am trying to adding the layers as follow:
tfl.layer_name , layer_name = ZeroPadding2D, etc.

The output of model.layers[0] is:
<tensorflow.python.keras.layers.convolutional.ZeroPadding2D object at 0x7f0dab8533d0>

But, while calling the function summary(model) getting the below error:
AttributeError: The layer has never been called and thus has no defined output shape.

Can someone please help me, what i’m missing?
Thanks

I recommend you search the forum for posts about “the layer has never been called”.

You will find threads like this one:

The problem got solved, after I add the parameter input_shape to ZeroPadding2D layer definition.