# Impact of varying sequence length in ensemble GRU model

I am using ensemble gru for my project and keeping different cell sizes for different models !For example, first gru model is of size 16 and the second is of 8 and 4 for the third model. The model is running well but I don't see any difference in the results in keeping same unit size or different. can anyone explain the impact of varying unit size for ensemble gru. ? it would be great if answer is given with theoretical proof.

• Welcome to DS StackExchange. Please elaborate more on your question. For example: what do you mean with: "first gru model is of size 16". Do you mean GRU cells? Still, we don't know about the overall architecture of the models. Please provide more explanations on how you implemented things. As of now, it's not easy to help you. Jan 2, 2020 at 8:43
• @Leevo Thanks for your response.! Yes I am talking about GRU cells. I am using input layer(15,23) followed by masking and BN. since I'm using 3 layer ensemble GRU, initially with output Shape of(None, 16) for all 3 layers. To see the impact, I am varying the output for all three layers of GRU as (none,16),(none,8) and (none,4). and provide concatenated output to dense layer as input. Jan 3, 2020 at 8:11

## 1 Answer

The number of units in an RNN layer determines the amount of "memory" of that layer. Higher number of units make the model (potentially) able to remember longer sequences, and to explain current values based on information that dates more back in time. If on the other side the number of units is shorter, the model at that layer won't be able to recover information way back in the past. This is tru for any Recurren architecture (simple recurrent, LSTM, GRU).

If you increase the number of units of a GRU layer and you see that there's no improvement in the quality of your model, that probably means that your time series data have "shorter memory", i.e. that you don't need to go that far back in time in order to explain current values. Of course I didn't take a look at your data, this is just the most likely reason IMHO.

• Thanks for the answer. Could you please provide reference of any relevant research paper. Jan 3, 2020 at 17:14
• Actually, this is coming from my understanding of RNN cells. That's a great explanation from Colah's blog. Let me know if this helps, otherwise I cna find you other sources Jan 3, 2020 at 18:59