Is there any way to loop back output of an LSTM back into itself for a fixed number of timesteps? One way can be using for loop but I think it will be significantly slower.
In short an alternative of this.
Thank you for your reply!
I was wondering if I give the LSTM the same input k times (sequence length k instead of 1) instead of unrolling the timesteps using for loop, will it produce the same outputs as before?
For eg. a0 = [h0, h0, h0, ..., h0] #k times out, _ = lstm (h0, a0)
Will the out be same as appended a0 from the original for loop implementation?