Solved by ptrblck in post #4 
              
              
                Yes, because indexing a Dataset will return the sample without a batch dimension. The DataLoader creates the batch. Since random_split returns a Dataset, you won’t have a batch dimension using this approach.