[Q] If I trained LSTM model with fixed-len input but when predicting I used variable length input is that affect the performance?

I create the training set as a window of 11 size and stride 1 to the end of the corpus like this
x =
[1,2,3,4,5,6…]
[2,3,4,5,6,7…]
[3,4,5,6,7,8…]

y=
[0,0,0,0,0,1…]
[0,0,0,0,1,0…]
[0,0,0,1,0,0…]
For example my training set x shape is 512,11 (512 is bs and 11 is inputs) but when I predict the input shape is 1,20. Is it affect the performance of the model ?. I think that I trained the model with fix-length so in the predicting process I should do the same as training.

English is not my mother tongue if something is not clear pls tell me, Thank you

It will have some effect on the performance. But I can’t tell you whether the effect will be good or bad.

Test it.

1 Like