Hello, I am working on few-shot learning framework.
In few-shot learning, each batch should contain KN image, label pair, where K is the number of classes and N is the number of shots(images).
In this reason, I want to design dataset and dataloader as bellow,
In each iteration, dataloader iterates with class, and dataset for each class iterates with items.
class FSLDataset(Dataset): each item is ClassDataset which has data with a same class.
class ClassDataset(Dataset): each item is pair of images and label.
However, torhch.utils.data.Dataset only supports with tensors, numpy arrays, numbers, dicts or lists.
TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class ‘main.ClassDataset’>
Do you have any idea on this design?