Yes, this could be the case, but note that your code snippet uses the specified batch_size as the sequence length, since you are calling x = torch.unsqueeze(x, 0) and are thus creating a hard-coded batch size of 1 while the batch_size specified in the DataLoader is moved to dim1 and is thus the sequence length.