emerald-ai / torchmetal

A library for Meta-Learning and Few-Shot Learning with PyTorch.
MIT License
1 stars 3 forks source link

Add Meta-Dataset and VTAB #5

Open sevro opened 3 years ago

sevro commented 3 years ago

Is your feature request related to a problem? Please describe.

The current set of included datasets are too constrained, limited in diversity, or only weakly related to representation quality. Meta-Dataset (MD) and the Visual Task Adaptation Benchmark define good representations as those that adapt to diverse, unseen tasks with few examples. These datasets really push all current datasets provided by this library into the toy domain.

Implementing this feature will allow for rapidly testing and comparing models and confidently say which will perform better in real world situations.

Describe the solution you'd like

The google-research/meta-dataset repostiroy is Apache License Version 2.0 which is compatible with our MIT License so the quickest path to adding this feature will likely be to integrate the code in a way that is compatible with this libraries abstractions.

The biggest problem will be that the code (being from google) uses TensorFlow and is concerned with Python 2 compatibility which we do not care about supporting (only Python 3.6+). From their installation instructions:

Meta-Dataset is generally compatible with Python 2 and Python 3, but some parts of the code may require Python 3. The code works with TensorFlow 2, although it makes extensive use of tf.compat.v1 internally.

It looks like the code makes use of TFRecords which will need to be removed.

Describe alternatives you've considered

If migrating that code is not worth the effort the datasets required to create Meta-Dataset can be used from existing PyTorch implementations already in this dataset, TorchVision Datasets, or other PyTorch libraries. The dataloader and/or dataset combining logic will likely still be of interest at least as a reference implementation.

I have also considered developing a novel dataset, but the time to add this dataset will add significant value in a much shorter timeframe so that should be revisited later.

Behavior Changes

This feature is purely additive to the library and should not change behavior of any existing code or make any breaking API changes.

Additional context

Add any other context or screenshots about the feature request here.

sevro commented 3 years ago

When complete we should add the implementation to papers with code.