To the best of my knowledge, pytorch doesn’t have a list data type and hence can’t load a list of tensors as a list. It tries to convert a list of tensors into a single tensor, but all the tensors in the list need to have the same size.
What you could do instead is zero pad your images to either the maximum image size for the dataset or the batch. This will involve a trade off between being able to process larger batches vs performing unnecessary computations.