Meta Learning trainer

I am trying to implement meta learning trainer by myself. Since my data is different (non image), there are currently no proper implementations. I’ve seen plenty of implementations (1, 2, 3) online. First two make use of query set to update the loss with backward(). I liked the third one but it’s abstract (pseudo code). Can anyone post a good trainer that perform reptile/maml ?

Please ignore, can’t delete this post. The query set can come from training set.