Week 1 assignment 2 problems with layers definition

my code is
model = tf.keras.Sequential([
## ZeroPadding2D with padding 3, input shape of 64 x 64 x 3
## Conv2D with 32 7x7 filters and stride of 1
tfl.Conv2D(32, 7, strides=1, input_shape=(70, 70, 3))(x2),
## BatchNormalization for axis 3
tfl. BatchNormalization(axis=3),
## ReLU
## Max Pooling 2D with default parameters
tfl.MaxPooling2D(pool_size=(2, 2),input_shape=(64, 64, 32)),
## Flatten layer
## Dense layer with 1 unit for output & ‘sigmoid’ activation
tfl.Dense(1, activation=‘sigmoid’)

and I got an error:
TypeError Traceback (most recent call last)
----> 1 happy_model = happyModel()
2 # Print a summary for each layer
3 for layer in summary(happy_model):
4 print(layer)

in happyModel()
32 tfl.Flatten(),
33 ## Dense layer with 1 unit for output & ‘sigmoid’ activation
—> 34 tfl.Dense(1, activation=‘sigmoid’),

TypeError: The added layer must be an instance of class Layer. Found: Tensor(“zero_padding2d/Pad:0”, shape=(None, 70, 70, 3), dtype=float32)

why does it happen?

There are several things going on in that code. The first step might be resolving the mix of sequential and functional type syntax. May e take a read here and see if that helps clear some things up?

Ugh, Discourse showed me this as a related thread and I didn’t notice how old it was. Sorry to disturb the slumber.