rchavezj:

hidden = torch.cat(torch.randn(1, 48, 128), torch.randn(1, 48, 128))


This is missing a pair of parantheses to make a tuple of two tensors rather than two single ones. Personally, I would always include the dimension, but your style might differ from mine be excellent.
I’m not sure there is much reason to not use torch.randn(2, 48, 128), though.
Best regards
Thomas