LSTM / GRU weights during test time

I am working on a historic time series dataset and using RNN, LSTM, GRU models, and I didn't find an answer if in test time, the h (or h, c) weights should be zeors for each batch?

If the weights should be zero, what they should be? the last updated weights from the training?

Thanks

Topic pytorch gru lstm rnn time-series

Category Data Science


The initial weights of h for GRU and h,c for LSTM are are often set to zeros, setting random weights is also an option. Also people have tried to learn the initial hidden states.

Since the hidden states are updated with every cell, if your sequences are long enough, it would not make a big difference how you initialize the hidden states.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.