Is an Input layer needed or not with Embedding?

In the Week 2 Emojify assignment, in the Emojify_V2 function, we define an Input layer before the Embedding layer using:

sentence_indices = Input(shape=input_shape, dtype='int32')

However, in the Keras documentation, it says the Embedding layer “can only be used as the first layer in a model”. This seems like a contradiction? Could we leave our Input layer out?



I don’t think Input is a “layer”. It’s more of a placeholder for the things you add to create a model.

Ok. That makes sense. Thanks.