How to modify ImageFolder in pytorch to return a tensor of a different shape?

How to extend torch.datasets.ImageFolder in pytorch to return a tensor of a different shape?

It currently returns: torch.Size([1, 3, 256, 256]). I want to return [1, 10, 3, 256, 256].

I have a directory with multiple images separated into folders. Each folder has up to 3000 images. I would like to modify the getitem function so that it returns bags of images, where each bag contains 10 images.

Thank you!



Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept