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

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation