2
$\begingroup$

I'm trying to understand how the size of the hidden state affects the GRU.

For example, suppose I want to make a GRU count. I'm gonna feed it with three numbers, and I expect it to predict the fourth.

How should I choose the size of the hidden state of a GRU?

$\endgroup$
2
$\begingroup$

Yes, your understanding of the hidden state is correct. But the size of the hidden state is a hyperparameter that needs to found by trial-and-error. There is no closed-form formula or solution which links the size of the hidden state and the problem at hand. But, there are some rules of thumb like to start out with the size of the hidden state to be a power of 2, etc. Keep tuning the hyperparameter until you get very good predictions.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.