1
$\begingroup$

I am a beginner in deep learning so bear with me. If I want to unfold the RNN in order to represent the relation of output to the input as a non-recursive functions I would have to know the number of time steps it takes for the RNN to make a prediction, correct? Hence it is important for me to know if the number of time steps is the same for every test input.

Will the number of time steps for an RNN which is unchanged in any way always stay the same?

$\endgroup$

1 Answer 1

1
$\begingroup$

When a trained RNN is tested, is the number of time-steps same for every input?

Typically, yes. If an input is too short, it can be padded. If an input is too long, it can encoded in some way to reduce length. A good discussion of these methods can be found here.

The reason I said typically is because an RNN is producing an output after each time step t. That is for each time step t there is an input t and output t. In classification tasks, we usually only want the last output. But in generative tasks we would want the output at each time t. It is certainly possible for the length to differ between inputs.

So like most things in machine learning the answer is, it depends.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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