Unless anyone else answers, perhaps you can write a short 5-10 line example, that reproduces the error you are seeing, using torch.rand(…) in place of actual data?  Try to make the xample as short as you can. Using names for the various constants, like seq_len, batch_size etc, will be a plus.