tristandeleu / pytorch-meta

A collection of extensions and data-loaders for few-shot learning & meta-learning in PyTorch
https://tristandeleu.github.io/pytorch-meta/
MIT License
1.98k stars 256 forks source link

Extension to semi-supervised meta-learning #36

Closed carmete closed 4 years ago

carmete commented 4 years ago

First of all, thanks a lot for this great library! It really facilitates meta-learning experiments.

I have noticed that semi-supervised data loading is currently not supported in pytorch-meta. Nonetheless, this would be useful to reproduce or expand upon the recent literature on semi-supervised meta-learning (e.g. 'Meta-Learning for Semi-Supervised Few-Shot Classification'). Thus, I would like to add this feature and wanted to ask for some direction.

Semi-supervised meta-learning, as described in the aforementioned paper, has the following requirements at both meta-train and meta-test time:

Do you have any suggestions which would be the best approach to do this?

One approach might be to have two separate datasets and corresponding dataloaders, one for labelled data and one for unlabelled data (including distractors). One could, for example, pass a random seed and labelled_ratio to restrict the datasets to only use part of the stored data within each ClassDataset. However, I do not know how to guarantee, that the unlabelled dataloader would load the same N classes as used by the labelled dataloader.