Let's demonstrate the code for an embedding layer without pretrained word vectors first. This code should look almost the same as the code in the previous example:
sequence_input = Input(shape=(sequence_length,), dtype='int32')
embedding_layer = Embedding(input_dim=vocab_size,
output_dim=embedding_dim,
input_length=sequence_length,
name="embedding")(sequence_input)