Patrick
As I understand it (newbie) the data loading is the same for all models – so if it is not an issue for GRU and CNN models it should not be impacting RNN /LSTM models.
The shapes for the LSTM model is as follows during each stage in the model in the forward code are shown below
def forward(self, x):
    #shape data with embedding layer and reshape

    #x = self.embed(x)

    #[1,1,65536 (8192 - data input *8 from embedding layer)]

    x = x.reshape(x.size(0),1,-1)

    # Initialize hidden state with zeros

    #[1,1,100]

    h0 = torch.zeros(self.layer_dim, x.size(0), self.hidden_dim).requires_grad_().to(self.device)

    #[1,1,100]

    # Initialize cell state

    c0 = torch.zeros(self.layer_dim, x.size(0), self.hidden_dim).requires_grad_().to(self.device)

    # One time step

    # We need to detach as we are doing truncated backpropagation through

    # time (BPTT) # If we don't, we'll backprop all the way to the start even after going

    # through another batch

    out, (hn, cn) = self.lstm(x, (h0.detach(), c0.detach()))

    # Index hidden state of last time step

    # out.size() --> [1,2]

    out = self.fc(out[:, -1, :])

    return out

Model Shapes – step by step
x ->[1000,41]         (representing batch size 1000 and 41 distinct values)
x = x.reshape(x.size(0),1,-1)->[1000,1,41]
h0 = torch.zeros(self.layer_dim, x.size(0), self.hidden_dim).requires_grad_().to(self.device)->[2,1000,100]
c0 = torch.zeros(self.layer_dim, x.size(0), self.hidden_dim).requires_grad_().to(self.device)->[2,1000,100]
out, (hn, cn) = self.lstm(x, (h0.detach(), c0.detach()))->[1000,1,100]
out = self.fc(out[:, -1, :])->[1000,2]
Thank you again.
Gerry