Can I use def __init__hidden (self, batch) instead:
hidden = torch.randn (1, batch, 512) .to (device)
       return hidden

hidden - which was obtained from the previous sequence. that is, do not make the new hidden, but use the previous one each time? The fact is that I am exploring a continuous sequence and it seems to me that hidden should be continuous.