Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about ProtoMAML #3

Open
xugy16 opened this issue Jul 5, 2022 · 0 comments
Open

Question about ProtoMAML #3

xugy16 opened this issue Jul 5, 2022 · 0 comments

Comments

@xugy16
Copy link

xugy16 commented Jul 5, 2022

Really appreciate for the shared code and it is really helpful.

I have a question about SeqMetaModel's Protomaml Setting.

  1. in this setting, init_weights and init_bias are initilized by ProtoVec.
  2. ProtoVec is calculated by self.learner(for example, bert)
  3. then self.learner is the computing graph.

proto_grads = torch.autograd.grad(loss, [p for p in self.learner.parameters() if p.requires_grad])
meta_grads = [mg + pg for (mg, pg) in zip(meta_grads, proto_grads)]

The meta_grads should not be added pg, because pg already in the graph by ProtoVec.

Really appreciate for your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant