Questions about djmodel from Improvise_a_Jazz_Solo_with_an_LSTM_Network_v4

Hi guys and mentors,

In the section of djmodel.
Q1. what is this layer, keras.layers.core.tf_op_layer.SlicingOpLambda ?
This is an important question for me, because what I learned from the class or hw hint is really different from the code, and this SlicingOpLambda plays a key role in my confusion… details are below:

The hint 1 said:


So, if the Tx = 1, The the layers should be somehow look like: [X_{t}, a_{t-1}, c0_{t-1}] -> RESHAPE() -> LSTM() -> DENSE() In other words, I should only have the figure below,

Q1.1 so far, my understanding is correct? Yes or No ?

if the Tx = 2
The the layers should be somehow look like: [X_{t}, a_{t-1}, c0_{t-1}] -> RESHAPE() -> LSTM() -> DENSE() -> LSTM() -> DENSE() In other words, I should only have the figure below,
image
Q1.2 so far, my understanding is correct? Yes or No ? I think something wrong here…

Q1.3 However, the TRUE output of the model is as below for the given Tx. My understanding is, if Tx > 1, I should have multiple blocks (layers) of LSTM and dense, but why there is only one? base on the output of the model, I found out, 1. the number of SlicingOpLambda has been increased between LSTM and Dense.
2. this SlicingOpLambda pop out between inputlayers and reshape

Tx = 1:
image
Tx = 2:
image
Tx = 3:
image
Tx = 10:
image

Guys, thank you again. Have a good weekend. lol

There is another picture, which is directly from the jupyter of the hw. In the column of “connected to”, 2 lstm are increased if Tx increases 1 … no idea what it is…