Shape of tensorflow model input I'm reading Masking and padding with Keras, in the beginning, an input example is:
[
  ["Hello", "world", "!"],
  ["How", "are", "you", "doing", "today"],
  ["The", "weather", "will", "be", "nice", "tomorrow"],
]

The article states:

The data is a nested list where individual samples have length 3, 5,
and 6, respectively. Since the input data for a deep learning model
must be a single tensor (of shape e.g. (batch_size, 6, vocab_size) in
this case)

What is this tensor's shape (batch_size, 6, vocab_size)?

*

*Is batch_size 3 since there're 3 sentences?

*What is 6 here? Is it the longest sentence's length?

*What is vocab_size?

The shape is strange to me because tf.keras.layers.Embedding's input is a "2D tensor with shape: (batch_size, input_length)." This is not the same with the above shape.

vocab_size is the size of the vocabulary, the number of unique tokens. They are one-hot encoded, hence the number of columns reflect their count. batch_size is the number of samples you pass to a training step at a time. So the tensor is batch size by the length of the longest sentence (shorter ones are padded) by the number of unique words.
