# floodsung/LearningToCompare_FSL

PyTorch code for CVPR 2018 paper: Learning to Compare: Relation Network for Few-Shot Learning (Few-Shot Learning part)

Repository: https://github.com/floodsung/LearningToCompare_FSL
Canonical: https://ross.abutalabs.com/products/learningtocompare_fsl
Language: Python
License: MIT
License Family: permissive
Topics: few-shot-learning, meta-learning
Last push: 2019-10-22T03:19:44+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3080, "days_push": 2507, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1076, forks 263 (observed 2026-08-28T04:03:29.525491+00:00)

## What it is
Official PyTorch implementation of the Relation Network for Few-Shot Learning from the CVPR 2018 paper 'Learning to Compare'. It includes training and testing scripts for Omniglot and mini-ImageNet few-shot classification benchmarks.

## Use cases
- reproduce relation network few-shot learning results
- train few-shot image classification on omniglot
- run 5-way 1-shot experiments on mini-ImageNet
- learn meta-learning with a learnable similarity metric
- baseline for few-shot learning research
- understand relation network architecture in pytorch

## When to choose
- you need a reference implementation of the CVPR 2018 Relation Network paper
- you want to benchmark few-shot learning on Omniglot or mini-ImageNet
- you are studying metric-based meta-learning approaches

## When to avoid
- you need a maintained library with modern PyTorch support (code targets Python 2.7 and PyTorch 0.3)
- you want production-ready few-shot learning tooling
- you need few-shot learning beyond image classification

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: machine-learning, deep-learning, computer-vision
- platform: python
- tags: few-shot-learning, meta-learning, relation-network, pytorch, research-code, cvpr-2018, omniglot, mini-imagenet, gpu

## Member repositories
- floodsung/LearningToCompare_FSL (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:29.525491+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:53:21.999162+00:00, confidence not recorded.
  - readme: https://github.com/floodsung/LearningToCompare_FSL (fetched 2026-08-28T04:03:29.525491+00:00, sha 793faa6d4b07)
- Data as of 2026-08-30T08:39:29.467469+00:00.
