Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A collection of extensions and data-loaders for few-shot learning & meta-learning in PyTorch
| Date | Stars |
|---|---|
| 2026-07-24 | 2060 |
| 2026-07-25 | 2060 |
| 2026-07-28 | 2060 |
| 2026-07-30 | 2060 |
| 2026-08-06 | 2060 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Torchmeta
[](https://pypi.org/project/torchmeta/) [](https://travis-ci.com/tristandeleu/pytorch-meta) [](https://tristandeleu.github.io/pytorch-meta/)
A collection of extensions and data-loaders for few-shot learning & meta-learning in [PyTorch](https://pytorch.org/). Torchmeta contains popular meta-learning benchmarks, fully compatible with both [`torchvision`](https://pytorch.org/docs/stable/torchvision/index.html) and PyTorch's [`DataLoader`](https://pytorch.org/docs/stable/data.html#torch.utils.data.DataLoader).
#### Features
- A unified interface for both few-shot classification and regression problems, to allow easy benchmarking on multiple problems and reproducibility.
- Helper functions for some popular problems, with default arguments from the literature.
- An thin extension of PyTorch's [`Module`](https://pytorch.org/docs/stable/nn.html#torch.nn.Module), called `MetaModule`, that simplifies the creation of certain meta-learning models (e.g. gradient based meta-learning methods). See the [MAML example](examples/maml) for an example using `MetaModule`.
#### Datasets available
- **Few-shot regression** (toy problems):
- Sine waves ([Finn et al., 2017](https://arxiv.org/abs/1703.03400))
- Harmonic functions ([Lacoste et al., 2018](https://arxiv.org/abs/1806.07528))
- Sinusoid & lines ([Finn et al., 2018](https://arxiv.org/abs/1806.02817))
- **Few-shot classification** (image classification):
- Omniglot ([Lake et al., 2015](http://www.sciencemag.org/content/350/6266/1332.short)[, 2019](https://arxiv.org/abs/1902.03477))
- Mini-ImageNet ([Vinyals et al., 2016](https://arxiv.org/abs/1606.04080), [Ravi et al., 2017](https://openreview.net/forum?id=rJY0-Kcll))
- Tiered-ImageNet ([Ren et al., 2018](https://arxiv.org/abs/1803.00676))
- CIFAR-FS ([Bertinetto et al., 2018](https://arxiv.org/abs/1805.08136))
- Fewshot-CIFAR100 ([Oreshkin et al., 2018](https://arxiv.org/abs/1805.10123))
- Caltech-UCSD Birds ([Hilliard et al., 2019](https://arxiv.org/abs/1802.04376), [Wah et al., 2019](http://www.vision.caltech.edu/visipedia/CUB-200-2011.html))
- Double MNIST ([Sun, 2019](https://github.com/shaohua0116/MultiDigitMNIST))
- Triple MNIST ([Sun, 2019](https://github.com/shaohua0116/MultiDigitMNIST))
- **Few-shot segmentation** (semantic segmentation):
- Pascal5i 1-way Setup
- **Few-shot classification (tabular datasets)**
- Letter ([Frey & Slate, 1991](https://www.openml.org/d/6))
- One Hundred Plants (Margin) ([Mallah et al. 2013](https://www.openml.org/d/1491))
- One Hundred Plants (Shape) ([Mallah et al. 2013](https://www.openml.org/d/1492))
- One Hundred Plants (Texture) ([Mallah et al. 2013](https://www.openml.org/d/1493))
- Bach Choral Harmony ([Radicioni & Esposito, 2010](https://www.openml.org/d/4552))
## Installation
You can install Torchmeta either using Python's package manager pip, or from source. To avoid any conflict with your existing Python setup, it is suggested to work in a virtual environment with [`virtualenv`](https://docs.python-guide.org/dev/virtualenvs/). To install `virtualenv`:
```bash
pip install --upgrade virtualenv
virtualenv venv
source venv/bin/activate
```
#### Requirements
- Python 3.6 or above
- PyTorch 1.4 or above
- Torchvision 0.5 or above
#### Using pip
This is the recommended way to install Torchmeta:
```bash
pip install torchmeta
```
#### From source
You can also install Torchmeta from source. This is recommended if you want to contribute to Torchmeta.
```bash
git clone https://github.com/tristandeleu/pytorch-meta.git
cd pytorch-meta
python setup.py install
```
## Example
#### Minimal example
This minimal example below shows how to create a dataloader for the 5-shot 5-way Omniglot dataset with Torchmeta. The daExcerpt of 6,936 characters
Read on GitHubTristan Deleu
296
29
9
4
3
2
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:4c5e164795cdc245, topic:pytorch