Can't figure out layer shape

I’m trying to do the optional week 3 lab. When I get to the model building stage:

model = tf.keras.Sequential([
tf.keras.layers.Embedding(vocab_size+1, embedding_dim, input_length=max_length, weights=[embeddings_matrix], trainable=False),
tf.keras.layers.Conv1D(128, 5, activation=‘relu’),
tf.keras.layers.Dense(6, activation=‘relu’),
tf.keras.layers.Dense(1, activation=‘sigmoid’)
model.compile(loss=‘binary_crossentropy’, optimizer=‘adam’, metrics=[‘accuracy’])

num_epochs = 50
history =, training_labels, epochs=num_epochs, validation_data=(test_sequences, test_labels), verbose=2)

print(“Training Complete”)

My input data isn’t the right shape. It says expected= (None, 16) , but which input needs to be changed?
How to get it to that shape?

I am not noticing anywhere that an Input is defined. You need something like

    #define an input layer 
input_layer = keras.Input(shape=(784,), name="my_input_layer")

    #inform the model about its inputs

There’s a little more about this here: Tips for troubles with Sequential and Functional API syntax