{"id":17596036,"url":"https://github.com/gcucurull/maml_flax","last_synced_at":"2025-04-30T04:50:00.451Z","repository":{"id":129629265,"uuid":"270352970","full_name":"gcucurull/maml_flax","owner":"gcucurull","description":"Model Agnostic Meta Learning (MAML) implemented in Flax, the neural network library for JAX.","archived":false,"fork":false,"pushed_at":"2020-09-18T08:58:47.000Z","size":6,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T04:49:56.311Z","etag":null,"topics":["flax","jax","maml","meta-learning"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gcucurull.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-07T15:45:52.000Z","updated_at":"2023-11-07T14:02:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"aac6640a-2012-47b8-aa92-32295a4e41e0","html_url":"https://github.com/gcucurull/maml_flax","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"a4a8819b4c916fe0f5f505c18b2e76900146079f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcucurull%2Fmaml_flax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcucurull%2Fmaml_flax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcucurull%2Fmaml_flax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcucurull%2Fmaml_flax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gcucurull","download_url":"https://codeload.github.com/gcucurull/maml_flax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251644827,"owners_count":21620630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flax","jax","maml","meta-learning"],"created_at":"2024-10-22T08:07:15.104Z","updated_at":"2025-04-30T04:50:00.429Z","avatar_url":"https://github.com/gcucurull.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MAML implementation in Flax\nModel Agnostic Meta Learning (MAML) implemented in Flax, the neural network library for JAX.\n\n## Introduction \nThis repository implements a MAML example for sinusoid regression in Flax. The idea of MAML is to learn the initial weight values of a model that can quickly adapt to new tasks. For more information, check the [paper](https://arxiv.org/abs/1703.03400).\n\nThis implementation uses only default Flax components like `flax.nn.Model` and `flax.nn.Module`, showing that this kind of optimization-based Meta Learning algorithms can easily be implemented in Flax/JAX.\n\nIt is based on the [MAML implementation in JAX by Eric Jang](https://blog.evjang.com/2019/02/maml-jax.html) and updated to use Flax components. I have only implemented the sinusoid example so far, but I intend to add the Omniglot example too.\n\nThere is also an implementation of a model that fits just to one sinusoid, without meta learning, useful to see the difference between the two approaches. This approach is implemented in `main_wo_maml.py`.\n\n## Running\nJust run `python main.py` to train MAML for fast adaptation to sinusoid regression tasks.\n\n\n## Citation\nIf you use this code in your work please cite the original paper:\n```\n@inproceedings{finn2017model,\n  title={Model-agnostic meta-learning for fast adaptation of deep networks},\n  author={Finn, Chelsea and Abbeel, Pieter and Levine, Sergey},\n  booktitle={Proceedings of the 34th International Conference on Machine Learning-Volume 70},\n  pages={1126--1135},\n  year={2017},\n  organization={JMLR. org}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcucurull%2Fmaml_flax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcucurull%2Fmaml_flax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcucurull%2Fmaml_flax/lists"}