model_GRU = tf.keras.Sequential([
tf.keras.layers.GRU(256, return_sequences=True, name='GRU_1_returns_seq'),
tf.keras.layers.GRU(128, return_sequences=True, name='GRU_2_returns_seq'),
tf.keras.layers.GRU(64, name='GRU_3_returns_last_only'),
tf.keras.layers.Dense(10)
])
From the code snippet above, how exactly are the layers connected to each other? How are the 256 hidden states mapped to 128 inputs?
1 Like
The sequential type of model gets an input and runs it through all the layers inside it in a sequence. Input here is going through from 256 GRU cells to final output which has 10 neurons and there are other layers in between!
1 Like
What you have mentioned is something I can already infer from code. Could you help me visualize the RNN unfolding and the inputs in a distinct way? Also why is Layer and Layer 2 fully connected?
The gap that I am trying to understand is in the lecture Yones talks about input at various timesteps and the hidden state that gets propagated. How is that represented in the above configuration?
1 Like
No, I cannot create new material for you, no time for that, but I advise you to check the Deep Learning Specialization, thats where I learned it from!
1 Like