Giter VIP home page Giter VIP logo

Comments (6)

iofu728 avatar iofu728 commented on May 18, 2024 1

Hi @dongguanting, this is how MAML does it. You can refer the MAML paper or other tutorials like AAAI21 MetaLearning Tutorial.

In short, for the inner update part, the model fine-tunes specific task i data based on original model parameter $\theta$ (Inner update bp). After an inner update step in the meta-train dataset, the model will store each loss of the meat-test dataset. At the end of each inner update step, the model recovers to the original parameter $\theta$.
The output update bp will calculate after all of the tasks' inner updates. The second-order derivative will make the model pay more attention to the transfer of knowledge between different tasks.

from vert-papers.

iofu728 avatar iofu728 commented on May 18, 2024

Hi @dongguanting, in fact, the whole logic can be found by analyzing the running script.
You can find MAML logic in forward_meta function, both inner loop and outer loop.
You can also find ProtoNet in the forwad_wuq function https://github.com/microsoft/vert-papers/blob/master/papers/DecomposedMetaNER/modeling.py#L125. We use a packaged nn.embedding class EntityTypes to memorize type embeddings.

from vert-papers.

dongguanting avatar dongguanting commented on May 18, 2024

Hi @iofu728, Thank you for your answer! But I still have another question which bothers me. I find that the model will backward twice during forward_meta function, namely inner update function and outer forward_wuqh. I think it may be related to MAML method, but why split into two processes to backward?

from vert-papers.

wjczf123 avatar wjczf123 commented on May 18, 2024

Hi, I also have similar question. Is there any parameter to control meta-learning? I want to reproduce the results of 1) Ours w/o MAML.

from vert-papers.

iofu728 avatar iofu728 commented on May 18, 2024

Hi @wjczf123, yeah, the code also supports full supervision mode(w/o MAML). You can set the use_supervise argument to True, which will call the forward_supervise function instead of forward_meta.

from vert-papers.

wjczf123 avatar wjczf123 commented on May 18, 2024

Nice! Thank you very much.

from vert-papers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.