C5-W2-Emojify question about the MODEL

Hey there, i was wondering about the EmojifyV2 model . the function we implement has only the right most layers which is 2 lstms , dropout and softmax. how does keras know to expand that to the model as seen in the picture in the assignment (also as similarly implemented on Week 1 LSTM for jazz music, when we used for-loop in order to move over all the Tx.


I’m not sure what you’re asking.
The Emojifyv2 assignment uses two 128-unit LSTM layers, along with the embedding layers.

@TMosh I think I actually asked the same question like 2 minutes ago in another post before seeing this.

I think the question is: How does Keras handle automatically the size of the different inputs, because in Jazz they all were the same size ?

@amityahav Correct me if I’m wrong.

actually i mean that when implementing the model in the jazz assignment a for-loop was required in order to propagate all the Tx inputs , hidden states and candidate one by one in order to make a layer , and in this assignment a single line of code which an LSTM cell gets as an input an array of embeddings - how keras knows to treat this array of embeddings and actually “make” a layer out of it so each embedding is propagated according to its place in the sentence?

hope this was more clear

in addition, why in the Jazz assignment couldnt we just implement the layer as in the Emojify model where we would just input an array of the music values to the LSTM?