Welcome to meta-blocks’s documentation!

Deployment & Documentation & Stats

PyPI - Python Version PyPI Version Build Status

Meta-Blocks is a modular toolbox for research, experimentation, and reproducible benchmarking of learning-to-learn algorithms. The toolbox provides flexible APIs for working with MetaDatasets, TaskDistributions, and MetaLearners (see the figure below). The APIs make it easy to implement a variety of meta-learning algorithms, run them on well-established benchmarks, or add your own meta-learning problems to the suite and benchmark algorithms on them.

System Illustration

Meta-Blocks package comes with:

  • Flexible APIs, detailed documentation, and multiple examples.

  • Popular models and algorithms such as MAML [FAL17], Reptile [NAS18], Protonets [SSZ17].

  • Supervised and unsupervised meta-learning setups compatible with all algorithms.

  • Customizable modules and utility functions for quick prototyping on new meta-learning algorithms.

Key Links and Resources:


Installation

It is recommended to use pip for installation. Please make sure the latest version is installed, as meta-blocks is updated frequently:

pip install meta-blocks            # normal install
pip install --upgrade meta-blocks  # or update if needed
pip install --pre meta-blocks      # or include pre-release version for new features

Alternatively, you could clone and run setup.py file:

git clone https://github.com/alshedivat/meta-blocks.git
cd meta-blocks
pip install .

Required Dependencies:

  • albumentations

  • hydra-core

  • numpy

  • Pillow

  • scipy

  • scikit-learn

  • tensorflow==2.2.0rc3

Examples

(Under construction.)

meta_blocks package

Subpackages

meta_blocks.adaptation package

Submodules
meta_blocks.adaptation.base module
meta_blocks.adaptation.maml module
meta_blocks.adaptation.maml_utils module
meta_blocks.adaptation.proto module
meta_blocks.adaptation.proto_utils module
meta_blocks.adaptation.reptile module
Module contents

meta_blocks.conf package

Module contents

meta_blocks.datasets package

Submodules
meta_blocks.datasets.base module
meta_blocks.datasets.omniglot module
meta_blocks.datasets.miniimagenet module
Module contents

meta_blocks.experiment package

Submodules
meta_blocks.experiment.eval module
meta_blocks.experiment.train module
meta_blocks.experiment.utils module
Module contents

meta_blocks.models package

Submodules
meta_blocks.models.classification module
Module contents

meta_blocks.networks package

Submodules
meta_blocks.networks.simple module
Module contents

meta_blocks.optimizers package

Submodules
meta_blocks.optimizers.multistep_optimizer module
Module contents

meta_blocks.samplers package

Submodules
meta_blocks.samplers.base module
meta_blocks.samplers.uniform module
Module contents

meta_blocks.tasks package

Submodules
meta_blocks.tasks.base module
meta_blocks.tasks.supervised module
meta_blocks.tasks.classic_supervised module
meta_blocks.tasks.limited_supervised module
meta_blocks.tasks.self_supervised module
Module contents

Submodules

meta_blocks.common module

meta_blocks.version module

meta_blocks is a modular toolbox for meta-learning research with a focus on speed and reproducibility.

Module contents

meta_blocks is a modular toolbox for meta-learning research with a focus on speed and reproducibility.

About

(Under construction.)

Frequently Asked Questions (FAQ)

(Under construction.)

What’s New?

The first alpha version has been released!


References

FAL17

Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, 1126–1135. JMLR. org, 2017.

NAS18

Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999, 2018.

SSZ17

Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In NeurIPS, 4077–4087. 2017.


Indices and Tables