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

2nd Order or 1st Order Approximation? #32

Open
Vampire-Vx opened this issue Sep 19, 2019 · 2 comments
Open

2nd Order or 1st Order Approximation? #32

Vampire-Vx opened this issue Sep 19, 2019 · 2 comments

Comments

@Vampire-Vx
Copy link

Vampire-Vx commented Sep 19, 2019

Is this implementation a 1st order Approximation version of Maml ?
In meta.py, when you do autograd.grad, you do not specify create_graph = True, which means that the gradient operation would not be included in the computation graph.

Thus, although the design here is trying to calculate the 2nd order derivatives, the grad is not included, so only 1st order approximation.

@yinxiaojian
Copy link

I think this implementation is only for first order version of MAML.
If for second version, need to set retain_graph = True, create_graph=True when calculating "torch.autograd.grad"

@MrDavidG
Copy link

@Vampire-Vx @yinxiaojian
I have also tried to set retain_graph = True, create_graph=True, but for mini-Imagenet, the performance is weaker than before.
Besides, the hidden dimensions I used for mini-imagent is [32,32,32,32] rather than 64, which is the same with the setting in the original MAML paper

hummarow added a commit to hummarow/MAML-Pytorch that referenced this issue Sep 26, 2022
in order to make the 2nd order derivatives available.
dragen1860#32
Now the regularizer coefficient makes differences.
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

3 participants