If your data loader is returning a list of tensors, and you want a single tensor you could use torch.stack to stack all elements within the list to a single Tensor.
list = [ torch.randn(5,5) for _ in range(10) ] 
tensor = torch.stack(list)
tensor.shape() #returns torch.Size([10, 5, 5])