# Working implementation of MAML (meta-learning) for FluxML?

**URL:** https://discourse.julialang.org/t/working-implementation-of-maml-meta-learning-for-fluxml/51954
**Category:** Machine Learning
**Tags:** question, flux
**Created:** [December 17, 2020, 12:31am UTC](https://discourse.julialang.org/t/working-implementation-of-maml-meta-learning-for-fluxml/51954 "2020-12-17T00:31:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bad\_at\_math](https://avatars.discourse-cdn.com/v4/letter/b/51bf81/32.png) [@bad\_at\_math](https://discourse.julialang.org/u/bad_at_math)
#### Post date: [December 17, 2020, 12:31am UTC](https://discourse.julialang.org/t/working-implementation-of-maml-meta-learning-for-fluxml/51954/1 "2020-12-17T00:31:02Z")

</div>

Hi everyone,

I was wondering if there are any public implementations of meta-learning techniques such as MAML ([[1703.03400] Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks](https://arxiv.org/abs/1703.03400)) in Flux. The model zoo has a MAML implementation ([https://github.com/FluxML/model-zoo/blob/master/contrib/meta-learning/MetaLearning.jl](https://github.com/FluxML/model-zoo/blob/master/contrib/meta-learning/MetaLearning.jl)); however, it uses deprecated Flux functionality such as `Flux.Optimise._update_params!` and `Flux.Tracker.gradient`. I’m fairly new to Flux, so it would be neat to see what a proper and current implementation would look like

Thanks in advance!

---

<div class="post-metadata">

### Author: ![mkschleg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkschleg/32/8035_2.png) [@mkschleg](https://discourse.julialang.org/u/mkschleg)
#### Post date: [January 3, 2021, 5:37pm UTC](https://discourse.julialang.org/t/working-implementation-of-maml-meta-learning-for-fluxml/51954/2 "2021-01-03T17:37:24Z")

</div>

I did [this implementation](https://github.com/mkschleg/FluxBooks.jl/blob/main/MetaLearning.ipynb) awhile ago. It works w/ Flux + Zygote. It was a quick and dirty port from the version found in the model zoo. I haven’t had time to write a pull request for that yet though, maybe this week.

There is almost definitely more efficient/better ways to implement this.
