Question about the inner gradient step
jingweiz opened this issue · 2 comments
jingweiz commented
Question about the inner gradient step
katerakelly commented
Hi Jingwei,
The lines you reference are doing the meta-evaluation of the network.
Before fine-tuning for each test task, the parameters of the test network
are reset and the optimizer is re-created, in these lines
<https://github.com/katerakelly/pytorch-maml/blob/master/src/maml.py#L100-L102>
.
As for the meta-training, you are correct that a batch of meta-updates is
collected by fine-tuning independently on separate tasks, all starting from
the same parameters, see here
<https://github.com/katerakelly/pytorch-maml/blob/master/src/maml.py#L159-L164>
.
Let me know if you still see a problem!
…On Sun, Feb 25, 2018 at 11:00 AM, Jingwei Zhang ***@***.***> wrote:
Hi,
Nice repo! One question about src/maml.py Line 107~111: as far as I
understand, when doing the inner gradient steps, maml uses the same /theta
for computing the loss for all the training demos, whereas in your
implementation, the parameters of test_net is updated after every
training demo, then the loss for the next training demo is computed using
the updated parameters. Am I misunderstanding sth here?
Thanks a lot in advance!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADplVuNA-IaMuuiVPJCL0xgJ_ggEUEg4ks5tYa3EgaJpZM4SSaZE>
.
--
Kate Rakelly
UC Berkeley EECS PhD Student
rakelly@eecs.berkeley.edu
jingweiz commented
Hey,
yes I found out I was reading it wrong so I deleted my question lol, but still thank you so much for the explanation:)