How to share a nn.LSTM layer for several sequence?

2022-02-22 17-05-32 的屏幕截图

e.g. in PointLSTM model, there are 4 sequences i.e. (x;f)_nt , they need to compute through a shared LSTM layer with a shared state, and output independent 4 states i.e. (h,c)_nt.

But I don’t know how to share a LSTM layer for 4 different sequences, or how to compute through LSTM but not update its state, which can achieve the shared-LSTM.