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.
Repository for few-shot learning machine learning projects
| Date | Stars |
|---|---|
| 2026-07-24 | 1282 |
| 2026-07-25 | 1282 |
| 2026-07-28 | 1282 |
| 2026-07-30 | 1282 |
| 2026-07-31 | 1282 |
| 2026-08-06 | 1282 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Few-shot learning
The aim for this repository is to contain clean, readable and tested
code to reproduce few-shot learning research.
This project is written in python 3.6 and Pytorch and assumes you have
a GPU.
See these Medium articles for some more information
1. [Theory and concepts](https://towardsdatascience.com/advances-in-few-shot-learning-a-guided-tour-36bc10a68b77)
2. [Discussion of implementation details](https://towardsdatascience.com/advances-in-few-shot-learning-reproducing-results-in-pytorch-aba70dee541d)
# Setup
### Requirements
Listed in `requirements.txt`. Install with `pip install -r
requirements.txt` preferably in a virtualenv.
### Data
Edit the `DATA_PATH` variable in `config.py` to the location where
you store the Omniglot and miniImagenet datasets.
After acquiring the
data and running the setup scripts your folder structure should look
like
```
DATA_PATH/
Omniglot/
images_background/
images_evaluation/
miniImageNet/
images_background/
images_evaluation/
```
**Omniglot** dataset. Download from https://github.com/brendenlake/omniglot/tree/master/python,
place the extracted files into `DATA_PATH/Omniglot_Raw` and run
`scripts/prepare_omniglot.py`
**miniImageNet** dataset. Download files from
https://drive.google.com/file/d/0B3Irx3uQNoBMQ1FlNXJsZUdYWEE/view,
place in `data/miniImageNet/images` and run `scripts/prepare_mini_imagenet.py`
### Tests (optional)
After adding the datasets run `pytest` in the root directory to run
all tests.
# Results
The file `experiments/experiments.txt` contains the hyperparameters I
used to obtain the results given below.
### Prototypical Networks

Run `experiments/proto_nets.py` to reproduce results from [Prototpyical
Networks for Few-shot Learning](https://arxiv.org/pdf/1703.05175.pdf)
(Snell et al).
**Arguments**
- dataset: {'omniglot', 'miniImageNet'}. Whether to use the Omniglot
or miniImagenet dataset
- distance: {'l2', 'cosine'}. Which distance metric to use
- n-train: Support samples per class for training tasks
- n-test: Support samples per class for validation tasks
- k-train: Number of classes in training tasks
- k-test: Number of classes in validation tasks
- q-train: Query samples per class for training tasks
- q-test: Query samples per class for validation tasks
| | Omniglot | | | |
|------------------|----------|-----|------|------|
| **k-way** | **5** |**5**|**20**|**20**|
| **n-shot** | **1** |**5**|**1** |**5** |
| Published | 98.8 |99.7 |96.0 |98.9 |
| This Repo | 98.2 |99.4 |95.8 |98.6 |
| | miniImageNet| |
|------------------|-------------|-----|
| **k-way** | **5** |**5**|
| **n-shot** | **1** |**5**|
| Published | 49.4 |68.2 |
| This Repo | 48.0 |66.2 |
### Matching Networks
A differentiable nearest neighbours classifier.

Run `experiments/matching_nets.py` to reproduce results from [Matching
Networks for One Shot Learning](https://arxiv.org/pdf/1606.04080.pdf)
(Vinyals et al).
**Arguments**
- dataset: {'omniglot', 'miniImageNet'}. Whether to use the Omniglot
or miniImagenet dataset
- distance: {'l2', 'cosine'}. Which distance metric to use
- n-train: Support samples per class for training tasks
- n-test: Support samples per class for validation tasks
- k-train: Number of classes in training tasks
- k-test: Number of classes in validation tasks
- q-train: Query samples per class for training tasks
- q-test: Query samples per class for validation tasks
- fce: Whether (True) or not (False) to use full context embeddings (FCE)
- lstm-layers: Number of LSTM layers to use in the support set
FCE
- unrolling-steps: Number of unrollExcerpt of 7,231 characters
Read on GitHub47
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:efb2cddb6a2acb5e, topic:pytorch