learn2learn is a PyTorch library for meta-learning implementations.
The goal of meta-learning is to enable agents to learn how to learn. That is, we would like our agents to become better learners as they solve more and more tasks. For example, the animation below shows an agent that learns to run after a only one parameter update.
learn2learn provides high- and low-level utilities for meta-learning. The high-level utilities allow arbitrary users to take advantage of exisiting meta-learning algorithms. The low-level utilities enable researchers to develop new and better meta-learning algorithms.
Some features of learn2learn include:
- Modular API: implement your own training loops with our low-level utilities.
- Provides various meta-learning algorithms (e.g. MAML, FOMAML, MetaSGD, ProtoNets, DiCE)
- Task generator with unified API, compatible with torchvision, torchtext, torchaudio, and cherry.
- Provides standardized meta-learning tasks for vision (Omniglot, mini-ImageNet), reinforcement learning (Particles, Mujoco), and even text (news classification).
- 100% compatible with PyTorch -- use your own modules, datasets, or libraries!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
A human-readable changelog is available in the CHANGELOG.md file.
Documentation and tutorials are available on learn2learn’s website: http://learn2learn.net.
To cite the
learn2learn repository in your academic publications, please use the following reference.
Sebastien M.R. Arnold, Praateek Mahajan, Debajyoti Datta, Ian Bunner.
"learn2learn". https://github.com/learnables/learn2learn, 2019.
You can also use the following Bibtex entry.
1 2 3 4 5 6 7
Acknowledgements & Friends¶
- The RL environments are adapted from Tristan Deleu's implementations and from the ProMP repository. Both shared with permission, under the MIT License.
- TorchMeta is similar library, with a focus on supervised meta-learning. If learn2learn were missing a particular functionality, we would go check if TorchMeta has it. But we would also open an issue ;)
- higher is a PyTorch library that also enables differentiating through optimization inner-loops. Their approach is different from learn2learn in that they monkey-patch nn.Module to be stateless. For more information, refer to their ArXiv paper.